Talk:OpenSSH/Cookbook/Public Key Authentication

Swapnil's guide uses a method that destroys ~/.ssh/authorized_keys as a side effect of the method. The 'Basics of Public Key Authentication' (https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Key-based_Authentication#Basics_of_Public_Key_Authentication) covers about the same material. The 'Basics...' already covers the same topic without destroying the authorized_keys file.

I am wondering: You want the public key to go to the remote host but under section 3 and 4 you are writing:

3) Transfer only the public key to remote machine. $ scp ~/.ssh/mykey_rsa fred@remotehost.example.org:.

4) Log in to the remote machine and add the new public key to the authorized_keys file, whether in ~/.ssh/authorized_keys, the default, or somewhere else as designated by the server's configuration. $ cat mykey_rsa >> ~/.ssh/authorized_keys

the mykey_rsa is the privat key !!! Instead it should read in both cases mykey_rsa.pub

Please confirm ! + Greetings !


 * thanks for spotting that typo, it is fixed now. Larsnooden (discuss • contribs) 14:58, 10 May 2014 (UTC)