In my home, I'm able to connect to my own computer via SSH when using my LAN IP. I can't connect using my public IP even when I disconnect the router and connect my computer directly to the modem. I restarted the SSH server to use port 4900 instead of 22 and still wasn't able to connect. I always get a connection refused error. I'm using Windows 7, with Putty as client and MobaSSH as server. I disabled Windows Firewall. What's going on?

link|improve this question

67% accept rate
Please include new information as part of the original question. – bbaja42 Jun 17 '11 at 14:33
feedback

3 Answers

Are you using a firewall? That could be blocking port 4900. Also, if you try to connect using the router, you need to set up port forwarding on the router to your computer to access it using SSH.

link|improve this answer
feedback

Depending on what system you are using (share more information on this please) this is probably a firewall issue.

link|improve this answer
feedback

Make sure the server is bound to all interfaces and not just the loopback interface.

link|improve this answer
hmm where do I find this? MobaSSH is based on cygwin so I have some Unix stuff in the preferences, even a sshd_config file. – Roberto Jun 17 '11 at 14:21
Do you have any ListenAddress directives in your sshd_config file? – Darth Android Jun 17 '11 at 14:31
it says ListenAddress 0.0.0.0 – Roberto Jun 17 '11 at 14:59
That should be correct, then. (0.0.0.0 is all interfaces). – Darth Android Jun 17 '11 at 15:19
feedback

Your Answer

 
or
required, but never shown

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