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.
Use a VPN Instead
Have you considered using a VPN instead of forwarding a port? For most users, a VPN is a much simpler and more secure choice than forwarding a port.
We use and recommend NordVPN because not only is it the fastest VPN, it includes a new feature called Meshnet that makes forwarding a port no longer necessary for most applications. With NordVPN Meshnet, you can connect to your devices from anywhere in the world, completely secure, over a highly encrypted VPN tunnel.
When shopping for a VPN, make sure that they meet the following criteria:
- Your VPN provider should have a no-logs policy. This means that they do not keep any logs of any kind.
- Make sure that your VPN provider has lots of exit nodes all around the world.
- Check that your VPN will not affect your speed.
- Verify that your VPN provider uses WireGuard as the underlying protocol.
- Many people prefer a VPN provider that is not based in the United States.
This is the list of requirements that we used when we were shopping around for a VPN provider. There are lots of free, shady VPN providers out there that we looked at and dismissed.
Based in Panama, using diskless servers, and with over 6,100 servers in 61 countries, we can safely say that NordVPN satisfies all of these requirements.
Once you've set up your NordVPN account on multiple computers and enabled Meshnet, you can seamlessly access all of your devices as if they were on the same network. You don't even have to log in to your router. It's very simple.
Every time you click on one of our affiliate links, such as NordVPN, we get a little kickback for introducing you to the service. Think of us as your VPN wingman.
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.
Don't forget to sign up for NordVPN's promo deal before it's gone.
You might notice that most of our site doesn't have ads on it. This is because we use partnerships with companies like NordVPN to keep the site running. Thank you for supporting us by using our referral links.