Skip to content

Latest commit

 

History

History
15 lines (9 loc) · 786 Bytes

allow_ssh_on_another_port.md

File metadata and controls

15 lines (9 loc) · 786 Bytes

Allow SSH on another port

I have on occasion encountered situations where I have wanted to allow SSH on a port other than the default port 22. This is a quick reference for how to do that using ufw.

sudo ufw allow <port number>/tcp

When doing major OS updates on Digital Ocean droplets, this is common practice, so the host is reachable when the update is complete.

Some people recommend disabling the default SSH port and use another port, to me this sounds a bit like security through obscurity, since a port scanner would probably give away the used port number anyway.

Resources and References