-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New-SSHSession only sporadically working on 3.0 alpha #376
Comments
|
Any test equipment I could test against? I do not have Cisco kit to test and see what could be happening.
…Sent from my iPhone
On Feb 4, 2021, at 6:27 AM, Max Kozlov ***@***.***> wrote:
Check timeout
Try to compare hostkeys used in new alpha and other variants
You can try to use host key storage from windows if you convert it from registry to json by Convert-SSHRegistryToJSonKnownHostStore
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Aslo can you provide information in terms of version of IOS and type of gear? Including key cipher and algorithm of the host and how ssh is setup in it.
…Sent from my iPhone
On Feb 4, 2021, at 6:09 AM, tbhel ***@***.***> wrote:
Running the 3.0 alpha on Powershell 7.1.1 on Ubuntu 20.
When using New-SSHSession to connect to Cisco switches, it sometimes work and sometimes doesn't. Connecting to other Linux hosts seem to work better. See output:
PS /home/tbhel> New-SSHSession -ComputerName "10.1.2.20" -Credential $cred
New-SSHSession: Session operation has timed out
PS /home/tbhel> New-SSHSession -ComputerName "10.1.2.20" -Credential $cred
Server SSH Fingerprint
Do you want to trust the fingerprint 5:21:60:b5:fb:5d:7b:9c:c6:8f:4c:24:36:8e:f:bd
[] Y [] N [?] Help (default is "N"): y
SessionId Host Connected
--------- ---- ---------
0 10.1.2.20 True
PS /home/tbhel> Get-SSHSession | Remove-SSHSession
True
PS /home/tbhel> New-SSHSession -ComputerName "10.1.2.20" -Credential $cred
SessionId Host Connected
--------- ---- ---------
0 10.1.2.20 True
PS /home/tbhel> Get-SSHSession | Remove-SSHSession
True
PS /home/tbhel> New-SSHSession -ComputerName "10.1.2.20" -Credential $cred
New-SSHSession: Session operation has timed out
Connecting from a regular SSH client always work.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@MVKozlov Increasing timeout does not help. When it does work, it connects in <1 second. @darkoperator I don't have any test equipment available unfortunately. I have tried to connect to several different switches, including:
The switches are running ssh version 2 with these algorithms:
|
At some point Cisco changed something in their implementation of SSH based that this is an issue many report. The weird part is that it is intermittent
…Sent from my iPhone
On Feb 4, 2021, at 6:55 AM, tbhel ***@***.***> wrote:
@MVKozlov Increasing timeout does not help. When it does work, it connects in <1 second.
Not sure exactly what you mean by compare hostkeys. The fingerprints seem to be correct.
@darkoperator I don't have any test equipment available unfortunately. I have tried to connect to several different switches, including:
Catalyst 2960X-48FPS-L running IOS 15.2(2)E5
Catalyst 4500X-32 running IOS-XE 03.10.00.E
The switches are running ssh version 2 with these algorithms:
Encryption Algorithms:aes128-ctr,aes192-ctr,aes256-ctr
MAC Algorithms:hmac-sha1
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Any chance you can do a packet capture of a successful vs failed auth?
…Sent from my iPhone
On Feb 4, 2021, at 6:59 AM, Carlos Perez ***@***.***> wrote:
At some point Cisco changed something in their implementation of SSH based that this is an issue many report. The weird part is that it is intermittent
Sent from my iPhone
>> On Feb 4, 2021, at 6:55 AM, tbhel ***@***.***> wrote:
>>
>
> @MVKozlov Increasing timeout does not help. When it does work, it connects in <1 second.
> Not sure exactly what you mean by compare hostkeys. The fingerprints seem to be correct.
>
> @darkoperator I don't have any test equipment available unfortunately. I have tried to connect to several different switches, including:
>
> Catalyst 2960X-48FPS-L running IOS 15.2(2)E5
> Catalyst 4500X-32 running IOS-XE 03.10.00.E
> The switches are running ssh version 2 with these algorithms:
>
> Encryption Algorithms:aes128-ctr,aes192-ctr,aes256-ctr
> MAC Algorithms:hmac-sha1
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub, or unsubscribe.
|
Also wonder if debug ip ssh would show something
…Sent from my iPhone
On Feb 4, 2021, at 6:59 AM, Carlos Perez ***@***.***> wrote:
At some point Cisco changed something in their implementation of SSH based that this is an issue many report. The weird part is that it is intermittent
Sent from my iPhone
>> On Feb 4, 2021, at 6:55 AM, tbhel ***@***.***> wrote:
>>
>
> @MVKozlov Increasing timeout does not help. When it does work, it connects in <1 second.
> Not sure exactly what you mean by compare hostkeys. The fingerprints seem to be correct.
>
> @darkoperator I don't have any test equipment available unfortunately. I have tried to connect to several different switches, including:
>
> Catalyst 2960X-48FPS-L running IOS 15.2(2)E5
> Catalyst 4500X-32 running IOS-XE 03.10.00.E
> The switches are running ssh version 2 with these algorithms:
>
> Encryption Algorithms:aes128-ctr,aes192-ctr,aes256-ctr
> MAC Algorithms:hmac-sha1
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub, or unsubscribe.
|
Yeah I saw the other issues with very similar problems. The weird thing is that Posh-SSH 2.2 works completely fine. I may have to get back to you on a packet capture, but I have the output of debug ip ssh here. Both the working and non-working are from the same switch, just moments between attempts. Working:
Non-working:
|
Managed to grab packet captures. The capture of the working connection obviously continues beyond what is included, but I did not see any point to including it in the dump. |
Thanks, will pass this to a ticket to SSH.Net project since it was working before the 2020 update
…Sent from my iPhone
On Feb 4, 2021, at 8:13 AM, tbhel ***@***.***> wrote:
Managed to grab packet captures. The capture of the working connection obviously continues beyond what is included, but I did not see any point to including it in the dump.
captures.zip
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@tbhel, I mean HostkeyName - old SSH.Net version use |
Just wanted to let you know that the problem still remains in version 3.0.8 unfortunately. |
Ok, was not expecting a fix for this issue in the releases. As to why is it failing on some of your linux host only thing I can recommend is to enable ssh debugging and see if it sheds some light as to why. Herr are some steps you can follow to do it https://support.cpanel.net/hc/en-us/articles/4402832130967-How-to-enable-debug-logging-for-SSHD-SSH-by-editing-the-etc-ssh-sshd-config
|
Ok, I saw the release notes for 3.0.7 regarding sshnet/SSH.NET#972 and got my hopes up. 🙂 |
Version 3.1.2 includes the latest version of SSH.NET, which should address this. |
Can confirm that this is fixed in version 3.1.3, thanks for your great work @darkoperator :) |
Running the 3.0 alpha on Powershell 7.1.1 on Ubuntu 20.
When using
New-SSHSession
to connect to Cisco switches, it sometimes work and sometimes doesn't. Connecting to other Linux hosts seem to work better. See output:Connecting from a regular SSH client always work. Connecting from Posh-SSH 2.2 on a Windows host also always work.
The text was updated successfully, but these errors were encountered: