Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a server with ubuntu installed. After I change the network configuration and restart server, ssh client can't connect server any more. But in the server I can use ssh client to connect itself and the netstat command shows that sshd is listening port 22. And in my computer (win7) ping command is OK to server's new IP.

The configuration in /etc/network/interfaces is:

auto eth0
iface eth0 inet static
address 10.80.x.x
gateway 10.80.x.1

I'm very confused about this. Hope somebody can give me some idea. Thank you in advance!!!

share|improve this question

migrated from stackoverflow.com Nov 15 '12 at 10:18

This question came from our site for professional and enthusiast programmers.

Provide ifconfig eth0 print could help here, also see for errors in ssh log (/var/messages in Ubuntu I think) –  Alexandre Lavoie Nov 15 '12 at 3:20
Some more things: what you changed the network configuration from and to and also run a tcpdump -n port 22 on the server while trying to connect to it also, use ssh -vvv to connect for more debugging info. –  Ladadadada Nov 16 '12 at 16:12
It would also be useful to know how your ssh daemon is configured (if it is specifically listening on the old IP address rather than all addresses you need to change that configuration and restart sshd when you change IP addresses...) –  voretaq7 Nov 16 '12 at 16:55

1 Answer 1

Try to connect to ssh daemon using telnet like this:

$ telnet 22

If you got something like this:

Trying 22...
telnet: Unable to connect to remote host: Connection timed out

Then the connection is likely blocked by a firewall or sshd listens on a wrong IP address (check/etc/ssh/sshd_config for a valid ListenAddress option).

In other case it should print something like:

Trying 22...
Connected to 22.
Escape character is '^]'.
SSH-2.0-OpenSSH_6.0p1 Debian-3ubuntu1

It means your client is able to connect to the server. If you still can't connect to the server with your ssh client then it is likely Windows Firewall blocks the client application.

Also doesn't your ssh client reports any kind of error?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.