Topic "[problem] OpenSSH SSH2 private key"

Author Message
Kino

Guest


I can't connect using SSH2 private key Sad But it works with SCRT & SecureFX programs. Did I do someting wrong or WinSCP don't support this method?

----------------------------------

Authentication log (see session log for details):
Using username "test".
Unable to use key file "C:\Documents and Settings\user\Desktop\.ssh\id_dsa" (OpenSSH SSH2 private key)
No supported authentication methods left to try!

Connection has been unexpectedly closed. Server sent command exit status 0.

----------------------------------

. Looking up host "192.168.0.22"
. Connecting to 192.168.0.22 port 22
. Server version: SSH-2.0-OpenSSH_3.5p1 FreeBSD-20030924
. We claim version: SSH-2.0-WinSCP-release-3.6.1
. Using SSH protocol version 2
. Doing Diffie-Hellman group exchange
. Doing Diffie-Hellman key exchange
. Host key fingerprint is:
. ssh-dss 1024 dd:b9:a8:29:0a:d8:22:3c:cc:52:36:f9:32:e8:51:cf
. Initialised AES-256 client->server encryption
. Initialised AES-256 server->client encryption
! Using username "test".
. Reading private key file "C:\Documents and Settings\user\Desktop\.ssh\id_dsa"
. Unable to use this key file (OpenSSH SSH2 private key)
! Unable to use key file "C:\Documents and Settings\user\Desktop\.ssh\id_dsa" (OpenSSH SSH2 private key)
! No supported authentication methods left to try!
. No supported authentications offered. Disconnecting
* (ESshFatal) Authentication failed.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
You need to convert your OpenSSH key to Putty format. Use Puttygen tool.
_________________
Martin Prikryl
Kino

Guest


Thanx Smile
DoNoEvil

Guest


prikryl wrote:
You need to convert your OpenSSH key to Putty format. Use Puttygen tool.


% puttygen id_dsa -o id_dsa.ppk

will convert the OpenSSH key to one PuTTY understands.
PLEP

Guest


Hi Martin,

I'm using CoreFTp and on the other side they are using WinSCP.
I tried to convert a SSH private key to a Putty using PuTTYgen.
I got a error message "Couldn't load private key (unsupported cipher)"

Need help. Thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
PLEP wrote:
I'm using CoreFTp and on the other side they are using WinSCP.
I tried to convert a SSH private key to a Putty using PuTTYgen.
I got a error message "Couldn't load private key (unsupported cipher)"

What cipher does your key use?
Can you post the key header?
PLEP

Guest


Hi

Cipher method when using 'generate key pair' on CoreFTP server side (not possible to change it)

Here is the header:

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CFB

Thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
PLEP wrote:
on CoreFTP server side

Are you sure you do not confuse server's host key with your account private key? Account private keys should not be generated on server-side.

Anyway, PuTTYgen does not support this cipher indeed. You would need to re-encrypt the key using another tool before you will be able to import the key to PuTTYgen.
Don Sanches

Guest


Seem to have solved this. Under some *NIX system (Linux or, as in my case, FreeBSD) change directory to where the private key is. Lets say it is named "private.key".
Run this:
ssh-keygеn -p
(Don't copy-paste it, I had to change one symbol because keygеn is a forbidden word at this forum, as it says, and I could not post it.)
It is basically for changing the password for the private key.
It asks now for the filename, enter: private.key
Then it asks for the current password, enter it
Then it asks for the new password twice, you can enter something new or just the same one.
It will re-write the file private.key but now it is coded with AES-128-CBC which PUTTY DOES understand! Now it can be imported by puttygen.
This way I solved the problem with the key coded with DES-EDE3-CFB which nothing could understand except one non-freeware program!
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