SSH Setup
This is basically notes to myself on how to get a basic ssh server running. I do this just too rarely that I’m comfortable doing it from memory.
- Install ssh (however you like according to your platform)
- Add and/or uncomment the following lines in /etc/ssh/sshd_config:
1 2 3 4 5 6 7
PermitRootLogin no PasswordAuthentication no # (can be yes for low-risk stuff) PermitEmptyPasswords no ClientAliveInterval 1000 # not sure if this one is needed ClientAliveCountMax 0 # disables inactive timeout Port 1234 # (not port 22) Port 4321 # (it's possible to expose more ports if desirable)
- Start/restart the ssh service
- On client, run:
ssh -p 1234 user@hostname-or-ip