When you use SSH you may need to forward ports in your router. Forwarding ports is used to allow incoming connection requests from the internet to SSH.
Routers are not designed to allow incoming network requests. Forwarding ports can work around this limitation.
Remember to Do These Things Before You Forward a Port
Before you can forward a port you need to know the following things:
- The IP address of your router.
- The internal IP address of your computer.
- Each of the TCP and UDP ports that you need to forward.
Find the IP Address of Your Router
The easiest way to locate your router's IP address is to run our free Router Detector utility. Our Router Detector tool is free to use and is part of our Network Utilities software.
We have a guide you can follow Find Your Router IP Address if you don't want to run the software.
Setting Up a Port Forward for SSH
The easiest way to forward your ports is to use our Network Utilities software. Since Network Utilities allows you to both forward and un-forward ports easily you can keep your network security maximized, and then forward ports only when you need them.
Alternatively you can do it by hand. The process for forwarding a port is:
- Log in to your router.
- Locate your routers port forwarding section.
- Put the IP address of your computer in the proper box in your router.
- Enter the TCP and UDP ports that you need to forward for SSH in the corresponding boxes in your router.
Some routers need to be rebooted in order for the changes to be saved.
You can choose your router from our list to see exactly how to forward ports for SSH:
List of Routers - Customized for SSH
Forward Ports for SSH
The ports that need to be forwarded for SSH are listed here:
SSH - PC
- TCP: 22
- UDP: 22
That's all it takes to forward your ports for SSH.
Still Can't Connect After Forwarding Your Ports?
Some internet connections can't be port forwarded at all. If your ISP uses CGNAT, or you are behind two routers (double NAT), incoming connections never reach your router, no matter how its ports are set.
For those connections a VPN is the way around it. NordVPN includes Meshnet, which links your devices over an encrypted connection so they can reach each other from anywhere, without opening any ports.
NordVPN links are affiliate links: if you sign up through one, we get a small commission. That's how we keep most of this site ad-free.
