-
-
Notifications
You must be signed in to change notification settings - Fork 970
Description
Hi,
I'm getting the below error on various version ( including 2025.1.0 )
Unhandled exception occurred Renci.SshNet.Common.SshException: Failed to upload /2880389.xml to ./2880389.xml
---> Renci.SshNet.Common.SftpException: An error occurred, but no specific error code exists to describe the failure.
at Renci.SshNet.Sftp.SftpSession.RequestClose(Byte[] handle)
at Renci.SshNet.SftpClient.InternalUploadFile(Stream input, String path, Flags flags, SftpUploadAsyncResult asyncResult, Action`1 uploadCallback, Boolean isAsync, CancellationToken cancellationToken)
at Renci.SshNet.SftpClient.InternalSynchronizeDirectories(String sourcePath, String destinationPath, String searchPattern, SftpSynchronizeDirectoriesAsyncResult asyncResult)
--- End of inner exception stack trace ---
I'm properly connected to the SFTP server:
Files in remote directory ./username: ["processing"]
Current working directory: /
And I'm able to successfully upload a file using lftp:
lftp -u username sftp://some_server.com -e "put /tmp/test.xml -o /test5.xml; bye"
I don't have problems downloading files from this server.
Telnet to the server reoprts:
SSH-2.0-DataPowerSSH_1.1
I've been trying both:
SftpClient.Upload and SftpClient.SynchronizeDirectories(sourcePath, ".", "*.xml")
Any idea what might be causing the problem?
Tried to specify the remote path as / , ./ and ./username
Thanks
edi1
Maybe debug logs will be useful and also the fact, the server only supports: ssh-rsa
info: Renci.SshNet.Connection.DirectConnector[0]
Initiating connection to 'Unspecified/some_server.com:22'.
info: Renci.SshNet.Session[0]
Server version 'SSH-2.0-DataPowerSSH_1.1'.
dbug: Renci.SshNet.Session[0]
[(null)] Performing curve25519-sha256 key exchange.
dbug: Renci.SshNet.Security.KeyExchangeECCurve25519[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Creating aes128-ctr server cipher.
dbug: Renci.SshNet.Security.KeyExchangeECCurve25519[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Creating aes128-ctr client cipher.
dbug: Renci.SshNet.Security.KeyExchangeECCurve25519[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Creating hmac-sha2-256 server hmac algorithm.
dbug: Renci.SshNet.Security.KeyExchangeECCurve25519[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Creating hmac-sha2-256 client hmac algorithm.
dbug: Renci.SshNet.SftpClient[0]
Disposing client.
info: Renci.SshNet.SftpClient[0]
Disconnecting client.
dbug: Renci.SshNet.Session[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Disposing session.
info: Renci.SshNet.Session[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Disconnecting session.
dbug: Renci.SshNet.Session[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Shutting down socket.
dbug: Renci.SshNet.Session[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Disposing socket.
dbug: Renci.SshNet.Session[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Disposed socket.
info: Renci.SshNet.Session[0]
[5ACDE0EBBF5E5D1ACBF0B8452F18745B0D6126EFB878BD01C445FCD9FD937224] Raised exception
Renci.SshNet.Common.SshConnectionException: Software caused connection abort
---> System.Net.Sockets.SocketException (53): Software caused connection abort
at Renci.SshNet.Abstractions.SocketAbstraction.Read(Socket socket, Byte[] buffer, Int32 offset, Int32 size, TimeSpan readTimeout)
at Renci.SshNet.Session.TrySocketRead(Socket socket, Byte[] buffer, Int32 offset, Int32 length)
at Renci.SshNet.Session.ReceiveMessage(Socket socket)
at Renci.SshNet.Session.MessageListener()
--- End of inner exception stack trace ---