1

I'm quite new to ssh, trying to use it to get a remote command line on my home PC from school.

As an Arch user, I followed the Arch Wiki's instructions on setting up ssh by enabling sshd.service. I changed the port to 8160 as it was recommended that I change it from 22 to use it across a WAN (i.e. the Internet), and I verified that this was not a port that was in known popular use on Wikipedia.

Yet, when I go to another PC in my house and search for 'what's my IP' on Google, use that and the port 8160 in Putty on Windows to connect, it says it times out. Why is this?

  • 3
    You surely have a router between your PC at home and the internet. So you would have to do a port forwarding at your router from <external-ip>:8160 to <your-pc>:22. If you are behind a router you do not need to change the SSH listening port from 22, but just add a forward in your router's firewall. – Thomas Mar 14 '17 at 17:36
  • To test your local configuration, you can instead use the address you get from ip addr on the machine running sshd (it's probably 192.168.x.y). This will only work from your own network (inside your house, basically), but it will make sure you've got sshd set up correctly. – Tom Hunt Mar 14 '17 at 17:40
  • Are you able to connect to localhost on the machine where you are running sshd? For example: ssh -p 8160 localhost – cherdt Mar 14 '17 at 20:15
  • @Thomas thank you; this was it. I made my own answer but realized I can only accept it in two days; mind making your own and I'll accept? – Jay Mar 14 '17 at 20:47
1

You surely have a router between your PC at home and the internet.

So you would have to do a port forwarding at your router from <external-ip>:8160 to <your-pc>:22.
If you are behind a router you do not need to change the SSH listening port from 22, but just add a forward in your router's firewall.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.