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:
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

