You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes the Connect() method will hang forever. I notice this happens when I reboot the SSH server. (My program that uses this library will automatically try to reconnect after a disconnection, and it's at this point when it hangs forever.)
Adjusting ConnectionInfo.Timeout has no effect on this problem.
Same happens to me.
I updated from version 2016.1.0 to 2020.0.1 and with some machines Connection hang forever in new version whereas with old version connection was a successfull one.
This is the method I use for connecting: @params.sshClient = new Renci.SshNet.SshClient(@params.connectionAsEvent.connection.Ip.Trim(), @params.GetPort() ?? 22, @params.GetUser(), @params.GetPassword()); @params.sshClient.Connect(); @params.shellStream = @params.sshClient.CreateShellStream("xterm", 80, 600, 0, 0, 32 * 1024);
And this is the exception it gave: Error Renci.SshNet.Common.SshOperationTimeoutException: Session operation has timed out at Renci.SshNet.Session.WaitOnHandle(WaitHandle waitHandle, TimeSpan timeout) at Renci.SshNet.Session.Connect() at Renci.SshNet.BaseClient.CreateAndConnectSession() at Renci.SshNet.BaseClient.Connect()
Activity
jgarciadelanoceda commentedon Apr 8, 2021
Same happens to me.
I updated from version 2016.1.0 to 2020.0.1 and with some machines Connection hang forever in new version whereas with old version connection was a successfull one.
This is the method I use for connecting:
@params.sshClient = new Renci.SshNet.SshClient(@params.connectionAsEvent.connection.Ip.Trim(), @params.GetPort() ?? 22, @params.GetUser(), @params.GetPassword()); @params.sshClient.Connect(); @params.shellStream = @params.sshClient.CreateShellStream("xterm", 80, 600, 0, 0, 32 * 1024);And this is the exception it gave:
Error Renci.SshNet.Common.SshOperationTimeoutException: Session operation has timed out at Renci.SshNet.Session.WaitOnHandle(WaitHandle waitHandle, TimeSpan timeout) at Renci.SshNet.Session.Connect() at Renci.SshNet.BaseClient.CreateAndConnectSession() at Renci.SshNet.BaseClient.Connect()WojciechNagorski commentedon Dec 21, 2023
It's done in #1274
WojciechNagorski commentedon Dec 29, 2023
The 2023.0.1 version has been released to Nuget: https://www.nuget.org/packages/SSH.NET/2023.0.1
kazykenov commentedon Jan 9, 2024
This experiencing this issue with the latest version of the library (2023.0.1)
In my case it freezes on file open.
It happens once in 1-2 days. I'm connecting to the files served by this docker container https://github.com/atmoz/sftp on Azure VM