diff --git a/index.js b/index.js index cbbb257..3263b55 100644 --- a/index.js +++ b/index.js @@ -61,7 +61,7 @@ io.on('connection', function(socket) { var conn = new ssh(); conn.on('banner', function(d) { //need to convert to cr/lf for proper formatting - d = d.replace(/\n/g, "\r\n"); + d = d.replace(/\r?\n/g, "\r\n"); socket.emit('data', d.toString('binary')); }).on('ready', function() { socket.emit('title', 'ssh://' + config.ssh.host); @@ -114,4 +114,4 @@ io.on('connection', function(socket) { 'hmac': ['hmac-sha1', 'hmac-sha1-96', 'hmac-md5-96'] } }); -}); \ No newline at end of file +});