Open Bradenb25 opened 2 years ago
Did you get a fix for this? even I am facing the same issue now.
Update: You have to create a host key on AWS that matches the type of key you are using for the private key....by default, the host key type used in AWS is not supported by this library.
I am getting the same issue connection to an AWS hosted SFTP server using v2020.0.2. The extact error from the AWS logs is : ERRORS KEX_FAILURE Message="no matching host key type found" Kex=ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss SourceIP=... I am using a ssh-rsa keyfile to authenticate, but this error suggests that AWS is not liking the host keyfile algorithm that is being sent. I tried to interrogate the type on the connectionInfo class using connectionInfo.CurrentHostKeyAlgorithm, but this returns null as it is not connected at that point. Any ideas any one?
Solution: In my case I was using SSH.NET library from some xyz vendor removed package from Nugget package manager and then installed SSH.NET by Renci fixed my issue.
issue background: due to some issue infra team has deleted FTP/*/Log directory from Server after that i was getting this issue 'An existing connection was forcibly closed by the remote host'
I'm able to initially connect to the sftp server. However, after the initial file upload I try and reconnect to upload another file. This is when I get 'An existing connection was forcibly closed by the remote host.' The connection and upload process I'm using is very simple.
It seems like when I disconnect it's not fully disconnecting so when trying to reconnect it throws this exception.