Featured image of post SSH Keygen

SSH Keygen

keygen

1
ssh-keygen -t ed25519 -C "comment"

authorized_keys

1
cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys

ssh config

/etc/ssh/sshd_config

  • Port 22
  • PermitRootLogin no or PermitRootLogin prohibit-password
  • PubkeyAuthentication yes
  • PasswordAuthentication no
  • AllowUsers user1 user2
Licensed under CC BY-NC-SA 4.0