Topic "Authentication fails using private key"

Author Message
Poonam33

Guest


Hi !!

I have created a public and private key pair using putty gen. And placed the public key on the sftp server and have private key saved on my system . Now when I try to connect to sftp server using private key in WinSCP then the authentication fails.Not sure why is it asking for username/pwd each time. Please guide me if I am missing something. It would be nice if somebody can tell me the complete steps required to setup Winscp to work with private key.

Here is the log
. 2009-09-25 09:52:47.237 --------------------------------------------------------------------------
. 2009-09-25 09:52:47.237 WinSCP Version 4.1.9 (Build 416) (OS 5.1.2600 Service Pack 3)
. 2009-09-25 09:52:47.237 Login time: Friday, September 25, 2009 9:52:47 AM
. 2009-09-25 09:52:47.237 --------------------------------------------------------------------------
. 2009-09-25 09:52:47.237 Session name: 192.168.1.101
. 2009-09-25 09:52:47.237 Host name: 192.168.1.101 (Port: 22)
. 2009-09-25 09:52:47.237 User name: (Password: No, Key file: Yes)
. 2009-09-25 09:52:47.237 Tunnel: No
. 2009-09-25 09:52:47.237 Transfer Protocol: SFTP (SCP)
. 2009-09-25 09:52:47.237 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2009-09-25 09:52:47.237 Proxy: none
. 2009-09-25 09:52:47.237 SSH protocol version: 2; Compression: No
. 2009-09-25 09:52:47.237 Bypass authentication: No
. 2009-09-25 09:52:47.237 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2009-09-25 09:52:47.237 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2009-09-25 09:52:47.237 SSH Bugs: -,-,-,-,-,-,-,-
. 2009-09-25 09:52:47.237 SFTP Bugs: -,-
. 2009-09-25 09:52:47.237 Return code variable: Autodetect; Lookup user groups: Yes
. 2009-09-25 09:52:47.237 Shell: default, EOL: 0
. 2009-09-25 09:52:47.237 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2009-09-25 09:52:47.237 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2009-09-25 09:52:47.237 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2009-09-25 09:52:47.237 Cache directory changes: Yes, Permanent: Yes
. 2009-09-25 09:52:47.237 DST mode: 1
. 2009-09-25 09:52:47.237 --------------------------------------------------------------------------
. 2009-09-25 09:52:47.362 Looking up host "192.168.1.101"
. 2009-09-25 09:52:47.362 Connecting to 192.168.1.101 port 22
. 2009-09-25 09:52:47.675 Server version: SSH-2.0-WRQReflectionforSecureIT_7.0.1 Build 505
. 2009-09-25 09:52:47.832 We claim version: SSH-2.0-WinSCP_release_4.1.9
. 2009-09-25 09:52:47.832 SSPI: acquired credentials for: poonam.saini@NA.DSMAIN.COM
. 2009-09-25 09:52:47.832 Cannot convert IP address to SPN: DNS is not trusted
. 2009-09-25 09:52:47.832 GSSKEX disabled: Data error (cyclic redundancy check).

. 2009-09-25 09:52:47.832 Using SSH protocol version 2
. 2009-09-25 09:52:47.832 Doing Diffie-Hellman group exchange
. 2009-09-25 09:52:48.302 Doing Diffie-Hellman key exchange with hash SHA-1
. 2009-09-25 09:52:48.850 Asking user:
. 2009-09-25 09:52:48.850 The server's host key was not found in the cache. You have no guarantee that the server is the computer you think it is.
. 2009-09-25 09:52:48.850
. 2009-09-25 09:52:48.850 The server's rsa2 key fingerprint is:
. 2009-09-25 09:52:48.850 ssh-rsa 2048 5f:3a:4a:a3:71:3b:1d:a1:c3:1e:de:c3:05:3a:e8:11
. 2009-09-25 09:52:48.850
. 2009-09-25 09:52:48.850 If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel.
. 2009-09-25 09:52:48.850
. 2009-09-25 09:52:48.850 Continue connecting and add host key to the cache? ()
. 2009-09-25 09:52:50.386 Host key fingerprint is:
. 2009-09-25 09:52:50.401 ssh-rsa 2048 5f:3a:4a:a3:71:3b:1d:a1:c3:1e:de:c3:05:3a:e8:11
. 2009-09-25 09:52:50.401 Initialised AES-256 CBC client->server encryption
. 2009-09-25 09:52:50.401 Initialised HMAC-SHA1 client->server MAC algorithm
. 2009-09-25 09:52:50.401 Initialised AES-256 CBC server->client encryption
. 2009-09-25 09:52:50.401 Initialised HMAC-SHA1 server->client MAC algorithm
. 2009-09-25 09:52:50.903 Reading private key file "C:\Program Files\WinSCP\PuTTY\DSA\ApexLRD.ppk"
. 2009-09-25 09:52:51.013 Pageant is running. Requesting keys.
. 2009-09-25 09:52:51.013 Pageant has 1 SSH-2 keys
. 2009-09-25 09:52:51.013 Pageant key #0 matches configured key file
. 2009-09-25 09:52:51.013 Prompt (1, SSH login name, , login as: )
. 2009-09-25 09:52:59.739 Disconnected: No username provided
* 2009-09-25 09:52:59.755 (ESshFatal) Connection has been unexpectedly closed. Server sent command exit status 0.
* 2009-09-25 09:52:59.755 Authentication failed.


Thanks ,
Poonam
Poonam33

Guest


Pls note : I am able to connect to this sftp server using Username/pwd but not using private key.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
It seems to fail because prompt for username was cancelled. I do not see any relation to using private key vs. password. If you still think there is, post a log file for successful login with password as well.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License