Skip to content
Bas edited this page Feb 15, 2020 · 5 revisions

Secure SSH server

This is an ansible-role for advancing the security of sshd: https://github.com/dockpack/secure_ssh

Secure SSH keys

Protect your ssh key-pairs from brute-forcing with the new key type and file format, use a strong passphrase!

ssh-keygen -a 100 -t ed25519 -C "$USER@$(hostname)"

~/.ssh/config

IdentityFile ~/.ssh/id_ed25519

ForwardAgent yes
HashKnownHosts yes

Install your public key on a remote machine.

ssh-copy-id remote_user@ssh_host

Enter your passphrase once per session, using the ssh-agent.

eval $(ssh-agent -s)
ssh-add

.bash_logout

ssh-add -D
ssh-agent -k