3

We just got a new router (Vodafone THG3000g) and it doesn't allow port forwarding for port 22. This means I can SSH in locally but can't do it remotely using the public ip.

I should be able to do port forwarding for a different port on the router, but how can I update the SSH settings on my Pi to do set this up? E.g. if i wanted to use port 2222.

Thanks

lukenm
  • 193
  • 2
  • 2
  • 7

1 Answers1

8

If you are looking for a procedure to change the SSH default port to another port number like 2222, check the SSH config file which is located on /etc/ssh/sshd_config.

sudo nano /etc/ssh/sshd_config

So, you would see Port 22 that you can change it to Port 2222. Then, save the file and restart the SSH service:

sudo service ssh restart
Mohi Rostami
  • 4,434
  • 1
  • 20
  • 39