|
Hi, I can able to connect to SFTP site successfully using the following credentials Using the FILEZILLA.exe Host : 411:216:217:453, Server Type : SFTP - SSH File Transfer Protocol, LogonType: Normal, user:mysite password:(Not required any password to connect) recently i downloaded RebexSftp-Trial-2.0.3854.0-DotNet2.0, If it works i want to buy the product but am getting the error message "supplied public key was not accepted by the server or user name is incorrect" using the below code: Am passing the correct user name value Sftp client = new Sftp(); client.Connect("411:216:217:453"); SshPrivateKey privatekey = new SshPrivateKey(@"C:\Documents and settings\Vision.v1\Desktop\SFTP\smfiles_sshkey_1.ppk",null); string password = ""; client.Login("mysite", privatekey); but am not able to connect, am using this component for the first time... below is the cipher information: SshCipher cipher = client.Session.Cipher;
A supplied public key was not accepted by the server or the user name is incorrect. BELOW IS THE LOG FILE INFORMATION: 2011-02-02 10:53:20.288 Opening log file. 2011-02-02 10:53:20.882 ERROR Sftp(1) Info: Rebex.Net.SshException: A supplied public key was not accepted by the server or the user name is incorrect. at Rebex.Net.SshSession.cCIjvV(String , String , SshPrivateKey , SshGssApiCredentials ) at Rebex.Net.SshSession.Authenticate(String userName, String password, SshPrivateKey privateKey) at Rebex.Net.Sftp.Login(String userName, String password, SshPrivateKey privateKey Please advise me, if need to do any changes in the code... Thaks in advance.... |
|
Make sure you register the public key to the remote SSH server you are connecting to. |
Are you sure you are using the same key file with Rebex SFTP as
If the username is correct, this error should only be thrown if the server doesn't accept the public key part of your key. Are you sure this is the same key you use in FileZilla?
Please create a communication log using Sftp object's LogWriter property (as described at http://www.rebex.net/kb/logging.aspx) and either add it to your post or mail it to support@rebex.net - we might be able to spot some problem there.
please see the below log information.....
2011-02-02 10:53:20.288 Opening log file.
2011-02-02 10:53:20.882 ERROR Sftp(1) Info: Rebex.Net.SshException: A supplied public key was not accepted by the server or the user name is incorrect.
at Rebex.Net.SshSession.cCIjvV(String , String , SshPrivateKey , SshGssApiCredentials )
at Rebex.Net.SshSession.Authenticate(String userName, String password, SshPrivateKey privateKey)
at Rebex.Net.Sftp.Login(String userName, String password, SshPrivateKey privateKey)
Yes am using the same key file with Rebex Sftp and FileZilla with the extension of the key as .ppk