Last Updated: February 25, 2016
·
962
· arehberg

Push public SSH key to server in one line

As the title says, this will push your public ssh key to the server/user you specify in the "user@hostname" part of the line.

cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys'

2 Responses
Add your response

ssh-copy-id does the same ;)

over 1 year ago ·

Sadly, that's not included in OSX by default as far as I know

over 1 year ago ·