.Net Library Can't get connection to server

Advertisement

Roxxinger
Joined:
Posts:
2

.Net Library Can't get connection to server

Hi,

Don't know what to to. Getting:
WinSCP.SessionRemoteException: Rechner-Schlüssel wurde nicht überprüft
Etc...

My code:
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);
}
What am i doing wrong? I also tried adding the path to the sshprivatekeyfile:
SshPrivateKeyPath = "C:\\temp\\",
But nothing changed.

Maybe someone can help me, didn't find something related in the FAQ, as far as i can see...

Reply with quote

Advertisement

Roxxinger
Joined:
Posts:
2

ok enabled logging, getting another fingerprint... switch to them getting now such an error
. 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

How to define the passphrase?

Reply with quote

Advertisement

You can post new topics in this forum