Skip to content

Instantly share code, notes, and snippets.

@kramarama
Created April 11, 2014 21:03
Show Gist options
  • Select an option

  • Save kramarama/10501463 to your computer and use it in GitHub Desktop.

Select an option

Save kramarama/10501463 to your computer and use it in GitHub Desktop.
ssh-keygen
cd ~/.ssh
ls -l
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
ls -ld ~/.ssh & ls -l ~/.ssh
ssh-copy-id -i id_rsa.pub root@ubuntu12
OR
cat ~/.ssh/id_rsa.pub | ssh user@host 'cat >> ~/.ssh/authorized_keys'
OR
ssh root@node02 'mkdir -p /root/.ssh'
scp /root/.ssh/id_rsa.pub root@node02:/root/.ssh/authorized_keys
ssh root@node02 'chmod 700 /root/.ssh'
ssh root@node02 'chmod 600 /root/.ssh/*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment