If you want to change your SSH port to something a little less obvious, it’s easy to do. It’s debatable how much security it actually gives you, but it will certainly make you feel safer, and that is probably the most important thing.
I’m using pico in this example, but vim will work just as well. You should find a line which is commented out, specifying that the port is 22. This doesn’t need to be uncommented normally, as it defaults to port 22.
Just uncomment this and put a new port number in.
Now save the file and exit. Finally, restart SSH for it to take affect.
Don’t forget, next time you SSH in you will need to use the new port number!
ssh -p 8473 hostname