Using PuTTY to SSH and authenticate with keys

Collins Richey crichey
Fri Oct 7 23:12:24 PDT 2005


On 10/7/05, Man-wai Chang <mwchang at i-cable.com> wrote:
> Brad De Vries wrote:
> > Hey all, I'm trying to setup PuTTY (version 0.58) on a WinXP box and
> > SSH into my Red Hat 9.0 server (openssh-server-3.5p1-11).  A simple
> > SSH seems to work fine but I'd like to get to the next level where I
> > can authenticate with keys rather than being prompted for a password.
> >
> > 1) Using PuTTYGen, I generated public and private keys with a passphrase.
>
> I recommend you to use `ssh-keygen -t rsa` of openssh on the linux to
> generate the private+public key, then copy the private key id_rsa to
> Window$ and use putty-keygen to convert it to putty format. Start putty
> with the converted private key to login linux.
>

For our older servers that don't connect with LDAP, we setup
passphraseless ssh connections via cygwin and putty on the windows (2K
and XP) machines. We run putty keygen, copy the public key into the
windows paste buffer (highlight on the putty keygen screen then
CTL-C). Using putty as administrator while running on the new user's
windows machine, we ssh to our own linux pc, then ssh from there to
the server that permits public key only connections (we already have a
key pair that allows the connection), sudo su - (we have sudo
permissions but others don't), setup the new users stuff on the server
including ~/..ssh/authorized_keys, vi[m] the authorized_keys and do
SHFT-INS to grab the key we pasted on the windows side. No editing or
monkying with the key is necessary. Adjust the permissions of
.ssh/..., and the new user is ready to fly.

HTH,

--
Collins Richey
      Debugging is twice as hard as writing the code ... If you write
      the code as cleverly as possible, you are, by definition, not
      smart enough to debug it.
             -Brian Kernighan



More information about the Linux-users mailing list