Featured image of post SSH

SSH

PublicKeyAuthentication

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

1
2
3
4
5
6
Port 22
PermitRootLogin no
#PermitRootLogin prohibit-password
PubkeyAuthentication yes
PasswordAuthentication no
#AllowUsers user1 user2

GatewayPorts

Allow remote port forwarding to bind 0.0.0.0.

ssh config

/etc/ssh/sshd_config

1
GatewayPorts yes
Licensed under CC BY-NC-SA 4.0