Re: .Net Library Can't get connection to server
Please read last section of
https://winscp.net/eng/docs/faq_passphrase
https://winscp.net/eng/docs/faq_passphrase
. 2013-04-10 09:32:54.330 Looking up host "ftp"
. 2013-04-10 09:32:54.330 Connecting to xxx.xxx.xxx.xxx port 22
. 2013-04-10 09:32:54.408 Server version: SSH-2.0-OpenSSH_4.3
. 2013-04-10 09:32:54.408 Using SSH protocol version 2
. 2013-04-10 09:32:54.408 We claim version: SSH-2.0-WinSCP_release_5.1.4
. 2013-04-10 09:32:54.455 Doing Diffie-Hellman group exchange
. 2013-04-10 09:32:54.549 Doing Diffie-Hellman key exchange with hash SHA-1
. 2013-04-10 09:32:54.720 Verifying host key rsa2 0x23,0xd with fingerprint ssh-rsa xxxx xx:xx:xx:xx:xx:xx:xx:xx:x:xx:xx:xx:xx:xx:xx:xx
. 2013-04-10 09:32:54.720 Host key matches configured key
. 2013-04-10 09:32:54.720 Host key fingerprint is:
. 2013-04-10 09:32:54.720 ssh-rsa xxxx xx:xx:xx:xx:xx:xx:xx:xx:x:xx:xx:xx:xx:xx:xx:xx
. 2013-04-10 09:32:54.720 Initialised AES-256 SDCTR client->server encryption
. 2013-04-10 09:32:54.720 Initialised HMAC-SHA1 client->server MAC algorithm
. 2013-04-10 09:32:54.720 Initialised AES-256 SDCTR server->client encryption
. 2013-04-10 09:32:54.720 Initialised HMAC-SHA1 server->client MAC algorithm
. 2013-04-10 09:32:54.829 Reading private key file "c:/temp/key.ppk"
! 2013-04-10 09:32:54.829 Using username "username".
. 2013-04-10 09:32:54.861 Offered public key
. 2013-04-10 09:32:55.235 Offer of public key accepted
! 2013-04-10 09:32:55.235 Authenticating with public key "public key"
. 2013-04-10 09:32:55.235 Prompt (3, SSH key passphrase, , Passphrase for key "public key": )
. 2013-04-10 09:32:55.235 Disconnected: Unable to authenticate
WinSCP.SessionRemoteException: Rechner-Schlüssel wurde nicht überprüft
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = "ftp.de",
UserName = "user",
Password = "pwd",
SshHostKeyFingerprint = "ssh-rsa 1023 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx",
};
using (Session session = new Session())
{
// Connect
session.Open(sessionOptions);
}
SshPrivateKeyPath = "C:\\temp\\",