Posted By

berkes on 01/26/10


key ssh rsa idrsa authorisation

Versions (?)

Oneliner to add a public key to a remote servers authorized-keys

 / Published in: Bash


Instead of ~/.ssh/, you can choose any location on your local machine where your public key lives. You may need to adjust the file permissions on remote authorizedkeys aftwterwards, depending on the configuration of the remote ssh server.

  1. ssh user@host 'mkdir ~/.ssh; echo '`cat ~/.ssh/`' >> ~/.ssh/authorized_keys'

Report this snippet  

You need to login to post a comment.