Difference between revisions of "Application talk:OpenSSH"

From WebOS Internals
Jump to navigation Jump to search
(→‎Multiple Keys: Copy public key only)
(Undo revision 19071 by DrPotoroo (talk) - misread discussion, post not needed)
 
Line 7: Line 7:
 
When you run ssh it will use each file until it finds one which works.
 
When you run ssh it will use each file until it finds one which works.
 
:just FYI, you can also re-use the same id_rsa and id_rsa.pub from one device on another. [[User:Dwc|Dwc]] 22:57, 21 September 2011 (UTC)
 
:just FYI, you can also re-use the same id_rsa and id_rsa.pub from one device on another. [[User:Dwc|Dwc]] 22:57, 21 September 2011 (UTC)
 
== Use only public keys! ==
 
You should not be copying anything besides id_rsa.pub onto your touchpad for key authentication. The file id_rsa is the PRIVATE key, and id_rsa.pub is the PUBLIC key. Public keys ONLY should be copied to the ssh server (in this case the touchpad) and they should be concatenated into a single file, 'authorized_keys', in the .ssh directory.
 
 
Each time you add a new public key to the touchpad, append it to the authorized key list like this:
 
cat <new_public_key_name>.pub >> /home/root/.ssh/authorized_keys
 
 
The above instructions are then entirely unneccessary. The private key should be just that - private - you don't want it copied all over the place.
 

Latest revision as of 01:04, 24 September 2011

Multiple Keys

If you have more than one device and you are banging your head against the wall because you can't get ssh into one or the other or both to work, you may be interested to learn that the id_rsa file is not meant to contain more than one key. If you generated keys on webOs on each of your devices, put the secret keys in separate files on the client, e.g. id_rsa.pre2 and id_rsa.tp, and then create .ssh/config with multiple entries

IdentityFile ~/.ssh/id_rsa.pre2
IdentityFile ~/.ssh/id_rsa.tp

When you run ssh it will use each file until it finds one which works.

just FYI, you can also re-use the same id_rsa and id_rsa.pub from one device on another. Dwc 22:57, 21 September 2011 (UTC)