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'
Written by Alex Rehberg
Related protips
2 Responses
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#