Jump to content
  • Advertisement
Sign in to follow this  
CyberSlag5k

Which port to route for SSH?

This topic is 4830 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My linux box is behind a wireless router and I'd like to be able to use SSH (putty specifically) to connect to it, so I have to configure the router to route the port traffic to that specific machine. Does anybody know which port(s) it is? Or perhaps a way to experiment and find out? I've never attempted to monitor port traffic before, but I imagine I could just look for the IP of the computer attempting the connection.

Share this post


Link to post
Share on other sites
Advertisement
22, eh? Would it be a bad idea to route all traffic to that port to one computer? It seems like something like 22 might be used for more. Do you know if it is?

EDIT:
Oh wow, I didn't even notice this. Putty lets you specify a port. Can I just choose one, arbitrarily, and route that traffic? That sounds reckless to me. Maybe there's a listing of generally free ports somewhere? Or perhaps my router logs port traffic and I can just see which ones don't get any traffic? This stuff is so cool.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
PuTTY can't change the port your server listens on. 22 is SHH only by the way, nothing else.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
PuTTY can't change the port your server listens on.


So I can't just change that number to something random and then forward that traffic to the appropriate computer when it hits the router?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by CyberSlag5k
So I can't just change that number to something random and then forward that traffic to the appropriate computer when it hits the router?


Well technically you can. If I understand you correctly, you want to forward a port on the router to another port on a computer on your network, that should work, provided that your router allows you to do it. It is actually good to have SSH on a nonstandard port if it's wide open to the internet. Prevents those pesky automated ssh scans... Hint: Make sure all users who are not supposed to have shell access have their default shell set to /sbin/nologin. You'll thank me later.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
One more thing... DO NOT use passwords that are present in a dictionary as passwords for ssh accounts accessible from the internet. Not even with some numbers like 123 attached to them. You'll thank me later for that too.

Share this post


Link to post
Share on other sites
Don't even use passwords; set up public/private keys.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The disadvantage of using key pairs is that you have to carry the private key with you on a floppy or usb key, though.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!