How to Set Up and Manage SSH Keys on Linux

Rob

Administrator
Staff member
Joined
Oct 27, 2011
Messages
1,853
Reaction score
3,512
Credits
8,894
Today we're going to go over the use of SSH keys. How to use them, setting them up and why they're preferred! We'll go through creating different keys for different uses, adding public keys to a remote server, setting up an SSH config file for management and more!

Helpful reference:
Code:
GENERATE KEY:
ssh-keygen -t ed25519 -C "comment" -f /path/to/key

COPY TO SERVER:
ssh-copy-id user@server

CONFIG FILE (~/.ssh/config):
Host nickname
    HostName server.com
    User username
    IdentityFile ~/.ssh/id_keyname

CORRECT PERMISSIONS:
~/.ssh/                 700
~/.ssh/id_ed25519       600
~/.ssh/id_ed25519.pub   644
~/.ssh/authorized_keys  600
~/.ssh/config           600

 

Attachments

  • ssh_keys-video2-YT.png
    ssh_keys-video2-YT.png
    616.6 KB · Views: 315,897


Nice, now I can login to my rpi3 without typing that darned password lol, thx
 


Follow Linux.org

Members online

No members online now.

Top