Re: How can Putty load my public key generated with OpenSSH
dkoleary_at_attbi.com
Date: 10/23/03
- Next message: jdpipe: "logging in with tunnels but no shell"
- Previous message: Nico Kadel-Garcia: "Re: Secure file transfer from unix to windows"
- In reply to: Ralph: "Re: How can Putty load my public key generated with OpenSSH"
- Next in thread: Ralph: "Re: How can Putty load my public key generated with OpenSSH"
- Reply: Ralph: "Re: How can Putty load my public key generated with OpenSSH"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 23 Oct 2003 13:24:58 GMT
Ralph <rgreen@preferredstaff.net> wrote:
> Your suggestion here would not help, but it gave me a clue to get
> closer. I am trying to get the keys I generated with OpenSSH to work
> with Putty. Seeing that ssh-keygen has an import option, I looked and
> sure enough there is an export option -e. So, I took my id_rsa file,
> and exported it to standard SSH2 format. I copied that to the Windows
> machine, where I ran puttygen and did a conversion on the key. That
> produced a fle that Putty will load as a key file. I tried to connect
> and Putty just exits. Looking in the log on the server machine, I see
> a message about no authentication methods being able to be negotiated.
> I have progressed a bit, but I'll keep looking. Incidentally, I took
> this private key to another Linux machine and used it to connect right
> away. So, my keys should be OK.
I didn't make myself clear. Let me take a large step back and go over
the basics. Sorry if this is overkill, but it's helpful to be
speaking from the same page.
Taking putty out of the picture, for the moment, let's say you have
two linux boxes: A and B. A is running the sshd daemon and allows
publick key authentication and passwords. B simply has openssh running
but no daemon running.
In order to connect and open a shell on A from B, a user on B can simply
execute "ssh A", enter a password and connect right in. If the user
on B wants to use public key authentication, he must do the following:
1. Create a key pair on B
2. Copy the public key to A
3. Update the A:~/.ssh/authorized_keys2 file
There are a number of failure points that I glossed over, but those
are the configuration steps.
A user on A then attempts to connect to B; the connection fails because
there is no ssh daemon running on B given the scenario above.
Getting back to your situation, putty is a ssh client - not an ssh
server (unless there's something about putty that I'm not aware of -
certainly a possibility). There is no way that I know of for someone
on your linux box to connect to putty on your windows system.
Therefore, there should be no reason to generate the keys on the linux
box to be used in putty.
Putty has its own key generation facility. In fact, it even has
it's own ssh-agent program that can be put in the startup. The
recommended and supported method of generating keys on putty to
be used with an openssh server is as follows:
1. On the putty system, execute puttygen.exe; follow the prompts to
generate the keys.
2. Execute pagent.exe. Right click the icon in the lower right,
select "add key", then navigate to where you stored your key pair.
When you open the key, it will ask for the passphrase that you supplied
above.
3. Copy the public key portion to the openssh server using either
winscp, or ftp.
4. Connect to the openssh server and execute
"ssh-keygen -i -f ${public} >> ~/.ssh/authorized_keys2"
>From this point, assuming you have all the permissions set correctly,
you will be able to execute
putty.exe -ssh -2 -X ${user}@${host}
to connect right in w/o supplying a password.
Hope that clears things up.
Doug
-- -------- Senior UNIX Admin O'Leary Computer Enterprises dkoleary@attbi.com (w) 630-904-6098 (c) 630-248-2749 resume: http://home.attbi.com/~dkoleary/resume.html
- Next message: jdpipe: "logging in with tunnels but no shell"
- Previous message: Nico Kadel-Garcia: "Re: Secure file transfer from unix to windows"
- In reply to: Ralph: "Re: How can Putty load my public key generated with OpenSSH"
- Next in thread: Ralph: "Re: How can Putty load my public key generated with OpenSSH"
- Reply: Ralph: "Re: How can Putty load my public key generated with OpenSSH"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|