Difference between revisions of "SSH key conversion"

From PrgmrWiki
Line 4: Line 4:
It could be used like
It could be used like
<pre>ssh-keygen -i rfc4716publickey >  authorized_keys</pre>
<pre>$ssh-keygen -i rfc4716publickey >  authorized_keys</pre>

Revision as of 15:11, 27 October 2008

OpenSSH has a special format of public key for public key authentication that is not according to rfc 4716. Because PuTTY and other software create the rfc 4716 format keys, it is necessary to convert them to the openssh format to be used to login to an openssh server. The ssh-keygen program with openssh will do this with the -i option, according to the manpage:

"This option will read an unencrypted private (or public) key file in SSH2-compatible format and print an OpenSSH compatible private (or public) key to stdout. ssh-keygen also reads the RFC 4716 SSH Public Key File Format. This option allows importing keys from several commercial SSH implementations."

It could be used like

$ssh-keygen -i rfc4716publickey >  authorized_keys