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
When I wan't to UploadFile then I get the following exception:
Renci.SshNet.Common.SshException: Channel was closed.
at Renci.SshNet.SubsystemSession.WaitOnHandle(WaitHandle waitHandle, Int32 millisecondsTimeout)
at Renci.SshNet.Sftp.SftpSession.OnChannelOpen()
at Renci.SshNet.SubsystemSession.Connect()
at Renci.SshNet.SftpClient.CreateAndConnectToSftpSession()
at Renci.SshNet.SftpClient.OnConnected()
at Renci.SshNet.BaseClient.Connect()
How can I get rid of this?
Greetings,
Sven
Here my code:
ConnectionInfo conInfo = new ConnectionInfo(smaHost, 22, smaUserName, new AuthenticationMethod[]{
new PasswordAuthenticationMethod(smaUserName,smaPW)
});
SftpClient sftpClient = new SftpClient(conInfo);
sftpClient.Connect();
string filePath = Path.Combine(ApplicationData.Current.LocalFolder.Path, "mongodb-org-4.2.repo")
sftpClient.UploadFile(SMAReader(filePath), "/etc/yum.repos.d/mongodb-org-4.2.repo", true);
sftpClient.Disconnect();
sftpClient.Dispose();
The text was updated successfully, but these errors were encountered:
When I wan't to UploadFile then I get the following exception:
Renci.SshNet.Common.SshException: Channel was closed.
at Renci.SshNet.SubsystemSession.WaitOnHandle(WaitHandle waitHandle, Int32 millisecondsTimeout)
at Renci.SshNet.Sftp.SftpSession.OnChannelOpen()
at Renci.SshNet.SubsystemSession.Connect()
at Renci.SshNet.SftpClient.CreateAndConnectToSftpSession()
at Renci.SshNet.SftpClient.OnConnected()
at Renci.SshNet.BaseClient.Connect()
How can I get rid of this?
Greetings,
Sven
Here my code:
The text was updated successfully, but these errors were encountered: