node.js ssh2shell wrapper fails to login to cisco devices
<p>I'm using node to manage some of our cisco devices and am running into an issue which I haven't been able to resolve in last two days. </p>

<p>Using SSH2 module I am able to connect and execute commands on Cisco gear, but that is limiting me to run only one command at a time. For a follow up command it requires me to establish a new connection and then run another command. This does not work for my needs.</p>

<p>Reading up on some of the answers in SO I started using SSH2Shell wrapper for SSH2 as it allows multiple commands to be executed in a sequential order. But using SSH2Shell I am not able to establish a connection to Cisco gear because the Ciphers offered by Client do not match what are supported on Server. I had the same problem with SSH2 module, but I was able to resolve that by adding the Cipher and KEX. When I do the same in SSh2Shell it does not work. I have tried adding them in several different ways and different places, it just wouldn't connect.</p>

<p>I think I am on the right track, I just don't know the right place to add the Ciphers and KEX.</p>

<p>Here is my code for SSH2Shell:</p>

<pre><code>var host = {
    server:        {  
            host:         "&lt;host IP&gt;",
            port:         "22",
            userName:     "&lt;username&gt;",
            password:    "&lt;password&gt;"
        },
        connection:         require ('ssh2'),
        commands:      [
            "show version",
            "show ssh"
        ],
        algorithms: {
            kex: [
                'diffie-hellman-group1-sha1',
                'ecdh-sha2-nistp256',
                'ecdh-sha2-nistp384',
                'ecdh-sha2-nistp521',
                'diffie-hellman-group-exchange-sha256',
                'diffie-hellman-group14-sha1'],
            cipher: [
                'aes128-ctr',
                'aes192-ctr',
                'aes256-ctr',
                'aes128-gcm',
                'aes128-gcm@openssh.com',
                'aes256-gcm',
                'aes256-gcm@openssh.com',
                'aes256-cbc'
            ]
        },
        msg: {
            send: function( message ) {
            console.log("message: " + message);
            }
        },
    verbose: true,
    debug:               true,
    idleTimeOut:         15000,
    connectedMessage:    "connected",
    readyMessage:        "ready",
    closedMessage:       "closed",

    onCommandComplete: function( command, response, sshObj ) {

        console.log("------------- onCommandComplete ---------");
        console.log(command + ": " + response);
    },
    onEnd: function( sessionText, sshObj ) {
        console.log("--------- onEnd has ------------");
        console.log(sessionText);
    }
};



//Create a new instance 
var SSH2Shell = require ('ssh2shell'),
    SSH       = new SSH2Shell(host);

//Start the process 
SSH.connect();
</code></pre>

<p>I get 'connected' followed by 'closed' on the terminal when I execute this. Debugging on Cisco Router shows me that my ciphers do not match.</p>

<p>Aug 22 12:06:59: %SSH-3-NO_MATCH: No matching cipher found: client aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm,aes128-gcm@openssh.com,aes256-gcm,aes256-gcm@openssh.com server aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc</p>