Subject: Key exchange failed. the server key was rejected by the client Date: 2015-10-08 21:51:57 From: Mark Sanchez Source: key-exchange-failed-server-key-rejected-client ----------------------------------------------------------------------We have downloaded the trial Ultimate SFTP .NET component and have tried to connect to an FTP server we maintain following the basic instructions here: http://www.componentpro.com/doc/sftp/Authenticating-to-an-SFTP-server.htm
Our project was built in VS 2012 with .NET FW 4.5
The error we get is "Key exchange failed. the server key was rejected by the client", which happens immediatley after calling the "connect" method.
For a comparison test, we tried connecting to the same server uisng WinSCP and were immediately successful.
We have found some differences in our FTP server logs, which I have bolded (Pardon any mistakes, I had to type this manually):
SFTP:
Algorithm negotiation complete: Proceeding with key exchange
Kex: 'diffie-hellman-group-exchange-sha256' Host Key: 'ssh-rsa' C2S : 'aes256-ctr, hmac-md5, none' S2C : 'aes256-ctr, hmac-md5,none'
DH Key sizes: Server Public '1024', Private '1023', Client Public '1024'
Closing connection: An existing connection was forcibly closed by the remote host.
WinSCP:
Algorithm negotiation complete: Proceeding with key exchange
Kex: 'diffie-hellman-group-exchange-sha256' Host Key: 'ssh-rsa' C2S : 'aes256-ctr, hmac-sha2-256, none' S2C : 'aes256-ctr, hmac-sha2,none'
DH Key sizes: Server Public '4096', Private '4095', Client Public '4096'
Authenticating password for user: xxx
Do you see anything in the above log output that might be obvious on your end? I have tried usign the "SetEncryptionAlgorithms" method with all supported algos but got the same message, although the values for the "Key sizes" did change.
TIA
Mark Sanchez
SPEC Services, Inc.
---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index