Passwordless SSH authentication with private/public key pairs

FIXME : I'll add more details here later about configuring OpenSSH passwordless auth, but just wanted to note down what I had to do for the commercial ssh.com server.

OpenSSH

ssh.com

The commercial SSH server, not used very often any more, but still some old boxes with it on.

The public key files are in a different format to OpenSSH ones. An OpenSSH one can be converted to an SSH2 (ssh.com) (IETF SECSH) format one with ssh-keygen -e :

[davidp@ruthenium:~]$ ssh-keygen -e            
Enter file in which the key is (/home/davidp/.ssh/id_rsa): 
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "2048-bit RSA, converted from OpenSSH by davidp@preshweb.co.uk"
<SNIPPED KEY DATA FROM HERE OBVIOUSLY>
---- END SSH2 PUBLIC KEY ----

Put the public key in a file on the remote host in the ~/.ssh2/ dir, then edit ~/.ssh2/authorization and add a line containing Key <filename>, example:

cat ~/.ssh2/authorization 
Key public_key.pub

Similarly, an ssh2 (IETF SECSH) format key can be converted back to an OpenSSH one with ssh-keygen -i:

[dave@warehouse .ssh]$ cat id_rsa_2048_a.pub 
---- BEGIN SSH2 PUBLIC KEY ----
Subject: dave
Comment: "2048-bit rsa, dave@cyborg, Fri Mar 16 2007 17:14:45"
AAAAB3[... snippped key data, naturally ....]
---- END SSH2 PUBLIC KEY ----


[dave@warehouse .ssh]$ ssh-keygen -i outputfile
Enter file in which the key is (/home/dave/.ssh/id_rsa): id_rsa_2048_a.pub

[dave@warehouse .ssh]$ cat foo
ssh-rsa AAAAB3[....snipped long line of key data....]UcDfun1
 
linux/sshkeys.txt · Last modified: 2010/02/26 10:45 (external edit)
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki