-
-
Notifications
You must be signed in to change notification settings - Fork 940
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
SSH.NET" Version=2020.0.0 #767
Comments
Any info on that error? |
With 2020.0.1 I am also seeing similar errors connection time(ms) : 30013, exception : Renci.SshNet.Common.SshOperationTimeoutException: Session operation has timed out I reverted to 2016.1.0 and things are fine now This is when trying to SSH into a Cisco router. |
@drieseng : Any update on this? |
Can any of you give me (private) access to a server/device that I can use to reproduce this issue? |
Hi everyone! We (on my job) recently met this error on connecting to Cisco Catalyst 9300-48UN-A Switch (Cisco IOS XE 16.12.2s). In our case, we unexpectedly stuck at awaiting During a sniffing session, we've concluded switch awaits Our step to reproduce a little bit the same
Our code snippet which we are testing public bool IsKeyValid(string userName, string privateKey)
{
using var privateKeyStream = new MemoryStream(Encoding.ASCII.GetBytes(privateKey));
using var sshClient = new SshClient(_address, _port ?? 22, userName, new PrivateKeyFile(privateKeyStream));
sshClient.Connect();
return sshClient.IsConnected;
}
@drieseng We don't have direct access to the switch and server with this problem, but maybe we can agree on a Zoom session with the owner. But probably they'll decline the request for NDA reasons |
Certain Cisco devices do not adhere to RFC4342 and do not reply if the client identifies first. Since identifcation can be in random order it will give random connection issues because the SSH_MSG_KEXINIT will not be sent if the client is faster. Since SSH.Net is not at fault and compatibility with Cisco (and possibly other) devices is something that can easily be supported I've written this modification. Added LazyIdentification to the ConnectionInfo object to allow late identification in ProtocolVersionExchange. Overloaded 'Start' function to keep the original functionality and tests intact. Highly likely fixes issues sshnet#752, sshnet#778, sshnet#469 and might help with sshnet#798, sshnet#767, sshnet#807
Certain Cisco devices do not adhere to RFC4342 and do not reply if the client identifies first. Since identifcation can be in random order it will give random connection issues because the SSH_MSG_KEXINIT will not be sent if the client is faster. Since SSH.Net is not at fault and compatibility with Cisco (and possibly other) devices is something that can easily be supported I've written this modification. Added LazyIdentification to the ConnectionInfo object to allow late identification in ProtocolVersionExchange. Overloaded 'Start' function to keep the original functionality and tests intact. Highly likely fixes issues sshnet#752, sshnet#778, sshnet#469 and might help with sshnet#798, sshnet#767, sshnet#807
It's done in #1274 |
The 2023.0.1 version has been released to Nuget: https://www.nuget.org/packages/SSH.NET/2023.0.1 |
Hi
I have a problem with SSH.Net 2020.0.0 When trying to SFTP file to Linux Server.
I am using .Net Core 3.1 under IIS.
The error that I am getting randomly is that the server is timing out.
Renci.SshNet.Common.SshOperationTimeoutException: Connection failed to establish within 30000 milliseconds.
Below is my code.
var connectionInfo = new RenciSftp.ConnectionInfo(this.FileServerHost,
this.FileServerUsername,
new RenciSftp.PasswordAuthenticationMethod(this.FileServerUsername, this.FileServerPassword));
}
The text was updated successfully, but these errors were encountered: