zlacker

Ask HN: Is Connecting via SSH Risky?

submitted by atrevb+(OP) on 2026-02-05 03:56:25 | 15 points 29 comments
[source] [go to bottom]

I have been managing websites for a while and usually utilize SSH connections to login to, deploy code to, and otherwise remotely access the hosting servers.

I was recently informed that a client I work with considers that a legal risk.

If the SSH connection is set to disallow passwords and only authorize via SSH keys, how big of a risk is this?


NOTE: showing posts with links only show all posts
◧◩◪
15. rl3+8p[view] [source] [discussion] 2026-02-05 08:12:46
>>Msurro+8m
Good defense is layered.

For vulnerabilities, complexity usually equals surface area. WireGuard was created with simplicity in mind.

>So, the alternatives to ssh you suggest are all reliant on passwords but ssh, in the case, is based on secure keys and no passwords.

WireGuard is key-based. I highly suggest reading its whitepaper:

https://www.wireguard.com/papers/wireguard.pdf

16. _Chief+2D[view] [source] 2026-02-05 10:02:42
>>atrevb+(OP)
> If the SSH connection is set to disallow passwords and only authorize via SSH keys, how big of a risk is this

low risk, do this. Keys (ed25519,4096 rsa) are impractical to brute force. However I'd also recommend:

- use a different port than 22 (add your .ssh/config for easier UX if needed) - port 22 can get incredibly noisy with tons of bots probing

- disable passwordAuth, disable PermitRootLogin - use a normal user with sudo for your ssh

- consider a vpn please - I use tailscale, but I hear headscale is good - then use UFW to only allow SSH from the tailscale network (I generally allow all network on tailscale). Tailscale wrote a guide on this here [1]

- do not add and forget authorized_keys from machines you arent using

- I'm especially worried about how people keep giving Clawdbot/Openclaw access to all their machines, key auth means the machine is authorized on your server

- For new servers I often just add all my public keys to them (github lists all your keys at github.com/GH_USERNAME.keys

1: https://tailscale.com/docs/how-to/secure-ubuntu-server-with-...

[go to top]