This project is read-only.

SSH-Sessions module cmdlets disconnects after first remote command

Nov 1, 2013 at 11:26 PM
I am connecting to cisco routers and switches.

I am able to keep a persistent "new-sshsession" connection. If I use "Invoke-sshcommand", I can run the remote command and get the output. Unfortunately, my session gets disconnected immediately after I get the output from a command.

You are no longer connected to CiscorouterIP. Skipping.

If I use make a new "new-sshsession" and use "enter-sshsession", I get a prompt. But, as soon as I try to send a command, I get the same error:

You are no longer connected to CiscorouterIP. Skipping.

I dont have any issues using Posh-SSH module (which uses the same SSH.NET library). The only reason I wanted to use SSH-Sessions module was because it has an interactive cmdlet, "enter-sshsession" (which I really need to use).

So, I'm not sure which will happen first... Posh-ssh module getting an enter-sshsession cmdlet, or SSH-Sessions module has a fix for Cisco devices that use SSH.

I would really appreciate help to get either way to work.