markcross

ssh basics - authorized_keys

Apr 13th, 2026 (edited)
3,680
1
Never
6
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | Software | 1 0
  1. mkdir ~/.ssh
  2. Set the right permissions:
  3.  
  4. chmod 700 ~/.ssh
  5. Create the authorized_keys file:
  6.  
  7. touch ~/.ssh/authorized_keys
  8. Set the right permissions:
  9. **OR**
  10. vi ~/.ssh/authorized_keys
  11.  
  12. chmod 600 ~/.ssh/authorized_keys
  13.  
  14. ##
  15. mkdir ~/.ssh; chmod 700 ~/.ssh ; touch ~/.ssh/authorized_keys ; chmod 600 ~/.ssh/authorized_keys ; vi ~/.ssh/authorized_keys
  16.  
Advertisement