Copy an SSH public key to a server

ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]

# where ssh-copy-id is not installed
cat ~/.ssh/id_rsa.pub | ssh [email protected] 
  'mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys'