No access to remote port 22

Posted on

Problem :

I can’t use distants port 22 anymore. This problem appeared “magically” when I booted today and tried to push some files on a remote git repo. I run on Ubuntu 11.10.
I tried connecting to other servers I have access and I can’t. However, no error message is displayed, the terminal just stay there, displaying :

ssh git@######.com -v -v -v
OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to ######.com [#.#.#.#] port 22.

I tried telnet, no more success :

telnet ######.com 22       
Trying #.#.#.#...

I tried deinstalling/reinstalling ssh, look at my iptables and route (default values), cleaned my ~/.ssh, nothing seemed to work. I really don’t know what to do now, the only option I can see is complete reinstall. Do you have an (other) idea ?

Thanks in advance !

Update : I was finally able to connect on remote port 22 after shutting down the computer for thirty minutes. Yes, strange enough, as repeated reboots didn’t do anything. I can only guess that @D_bye was right and the problem was on my organisation’s wifi side. Thanks a lot for your time and suggestions !

Solution :

If both ssh and telnet give you the same symptoms (i.e., sitting there seemingly doing nothing), then it is in all probability not a problem with your ssh install.

Have you checked your router/firewall config? If you don’t control the router/firewall, talk to the person that does. They may have either changed policy or fat-fingered a reconfig. I have seen similar problems with commodity switches, as well, so if you have a cheapo switch between your box and the ‘Net, try restarting it.

Questions:

  • Is sshd running?
  • Does your firewall permit ssh connections?
  • Are you running SELinux? (If so can you temporarily disable it to see if that’s the problem?)
  • Check your sshd settings – do you allow root logins if you’re trying to login as root? Is it configured to prompt for password?

Leave a Reply

Your email address will not be published.