Forest Notes

Tips, tricks, cheatsheets

Project maintained by iamzaychik Hosted on GitHub Pages — Theme by mattgraham

SSH Public keys authorization


  1. Generate own ssh-key:
    $ ssh-keygen -t rsa -b 4096
    Your public key has been saved in /home/user/.ssh/
  2. Now we have 2 new files:
    • id_rsa - private key (save in secure)
    • - public key (copy to servers)
  3. Copy public key:
    $ cat /home/user/.ssh/
  4. Login to server
  5. Insert public key to /home/<SERVER_USER>/.ssh/authorized_keys
  6. Check public key login:
    $ ssh <SERVER_USER>@<A.B.C.D>