I am running a SSH server on a Debian Wheezy box. I have 4 computers and two Android phones that can successfully connect to the SSH using local IP to the server.

But one of my computers cannot connect to the SSH server. The computer is my work computer that runs Win 7. If I connect through my OpenVPN then I can connect, but not when I connect directly using the local IP to the server. Only from this computer.

Any suggestions on where to continue? This drives me nuts!

  • what are the other machines running? can you try using putty. enable port 22 in the firwall outgoing list and see.
    – RC Brand
    Jan 20 '15 at 4:31
  • The other machines are running Windows 7, Windows 8.1, ElementaryOS and Android. There is no firewall active and no ports need to be opened in the router since this is all LOCAL traffic. Any other ideas?
    – Nick
    Jan 20 '15 at 4:37
  • 1
    What error are you getting? Can you share PuTTY event log both from the PC where you can connect and the PC where you cannot connect? Jan 20 '15 at 7:18
  • Tell us about the OpenVPN server.
    – Ramhound
    Jan 20 '15 at 17:21
  • Can you run Wireshark or some other network sniffer and see what the machine's actually trying to do? Could there be some corporate network security configuration in place that's interfering with your connection?
    – TMN
    Jan 20 '15 at 18:08

There are a lot of things that could be causing this. I'll provide some situations I've seen cause similar symptoms:

  • Local firewall configuration on the SSH server (you've said it's off, just including for completeness)
  • Affected workstation tries to connect via wireless even when physical connection is present. (Try connecting directly into your home router/switch via network cable. Then turn off your laptop's wireless and try SSH'ing in.)
  • Workstations windows firewall was blocking outgoing traffic. (Turn off windows firewall and see if you can connect. Just remember to turn it back on post-testing.)
  • Your home router segregates wireless/wired traffic. (Check your router's settings and/or try testing with both hosts are connected via network cables to your home router)

If your home network is more complex than a single home wireless router/switch, then there are some other niche problems you could be running into. You'd have to provide details on your setup for me to have a shot at helping you out, though.


OK so I have solved this and thought I should add the solution to here for others that may end up in the same situation.

Apparently the client I was trying to connect with was mentioned in the file /etc/hosts.deny. I deleted it from there and I could then connect to the SSH server!

Though, a few hours later it did not work again. I checked the /etc/hosts.deny file again and my client was again added to the file!

Some digging further lead me to the /var/lib/denyhosts/ directory which has the files: hosts, and hosts-restricted where my client was mentioned. I think it has to do with me entering the wrong password too many times, and then it just kept on repeating everytime I tried to do a bad login.

In the config file /etc/denyhosts.conf you can define settings for this and what should happen if someone gives the wrong login etc. In my case, the reason why it worked sometimes and sometimes not, was because the ban was removed after 5 days. Now I just commented it out so whenever someone is banned, the client will be banned forever until I unlock it myself. I also set up so that an email will be sent to myself whenever someone gets banned.

I hope this helps someone else too!

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.