No access to remote port 22

1

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 !

FabPelletier

Posted 2012-03-08T17:21:02.263

Reputation: 13

did you verify your connectivity? I mean can you ping the remote server? – Mallik – 2012-03-08T17:32:54.447

Yes, I can without problem. – FabPelletier – 2012-03-08T17:35:04.977

Check this solution... http://superuser.com/a/398526/118737

– Mallik – 2012-03-08T17:35:24.647

Doesn't seem to work, I'm still stuck ^^' – FabPelletier – 2012-03-08T17:55:14.810

Answers

0

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.

D_Bye

Posted 2012-03-08T17:21:02.263

Reputation: 474

I do control my firewall, but I didn't touch its config since I installed ubuntu, and it was a few months ago. I work from a public network and I had coworkers access the repo and the site I used for tests, without a glitch, so I guess it's safe to say it's not a swith either ? – FabPelletier – 2012-03-08T17:42:22.083

@FabPelletier - if others can connect to the server from the same network that you are on, then yes, it is safe to say it is not a switch on that network. It's also safe to say the server config is fine, and running correctly. Can you connect to other ssh servers on other machines from the same client computer? – D_Bye – 2012-03-09T10:51:12.120

0

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?

Scott C Wilson

Posted 2012-03-08T17:21:02.263

Reputation: 2 210

Yes, sshd was running, and my firewall allowed ssh connections. – FabPelletier – 2012-03-09T15:50:07.587

I was not running SELinux (or if I was, I have not been able to find it). And my sshd settings allow root logins but doesn't prompt for password. – FabPelletier – 2012-03-09T15:56:05.363

Any clues in /var/log? – Scott C Wilson – 2012-03-09T16:11:47.290

Sadly, no. As marked in the head of post, I think it was a problem with my network provider, as when I rebooted after some time and had a new IP address I was able to connect normally. – FabPelletier – 2012-03-10T17:16:29.693