Generate a Private/Pub-Key with et25519 and a Comment.
ssh-keygen -t ed25519 -f ~/.ssh/alican.ed25519 -C "Key for my homeserver"
Transfer the pub key to remote host. Typicall its located at
ssh-copy-id -i ~/.ssh/alican.ed25519.pub email@example.com
If you the ssh keys manually, be sure that the files have the correct permissions:
chmod 700 .ssh
chmod 600 ~/.ssh/authorized_keys
Login SSH with an explicit key
ssh -i ~/.ssh/alican.ed25519 firstname.lastname@example.org
Deaktivate password authentication.
Open the config
/etc/ssh/sshd_config and edit following lines like this:
Restart the SSH server to apply the changes
Save remote Hosts on your local client at
LocalForward 80 localhost:8080
Now just run the ssh command like this