SSH key pairs and getting it onto the server

cat ~/.ssh/id_rsa.pub | ssh someuser@someserver "mkdir -p ~/.ssh && cat >>  ~/.ssh/authorized_keys"

usual assumptions:

  • change `someuser` and `someserver` as appropriate
  • usual public key file and location on the client
  • usual authorisation file location on the server

Leave a Reply

Your email address will not be published. Required fields are marked *