Advertisement
mindthump

Setting up password-less SSH

Sep 15th, 2020 (edited)
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. ssh-keygen -t rsa
  2. ssh [email protected] mkdir -p .ssh
  3. cat .ssh/id_rsa.pub | ssh [email protected] 'cat >> .ssh/authorized_keys'
  4. ssh [email protected] "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
  5.  
  6.  
  7. keygen one-liner:
  8. ssh-keygen -t dsa -N "my passphrase" -C "test key" -f mykey
  9. OR
  10. HOSTNAME=`hostname` ssh-keygen -t rsa -C "$HOSTNAME" -f "$HOME/.ssh/id_rsa" -P "" && cat ~/.ssh/id_rsa.pub
  11. OR
  12. ssh-keygen -f id_rsa -t rsa -N ''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement