Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If a user can access a remote machine using SSH ok but then their static IP address changes and they find they can't access the machine, what's the problem?

I don't want to destroy the user's current public key by generating a new one because then they won't be able to SSH in other machines where their old public key was!

How do you get around this?

Many thanks.

share|improve this question
Firewall rule? Clarify "can't access the machine"... does SSH say bad auth? Does the connection even open? – Jeff Ferland Feb 23 '12 at 16:00
I have no clue why there should be a problem with the key. Please provide more information on error messages. – Mose Feb 23 '12 at 16:02
The error message is a SSH timeout – ale Feb 23 '12 at 16:04
Setting the user's previous static IP address makes it work... probably an iptables rule then? – ale Feb 23 '12 at 16:05
up vote 1 down vote accepted

It could be due to various reasons as outlined below,

  1. iptables/firewall as has been mentioned earlier by @Jeff Ferland You can check and confirm that by listing all the iptables rules currently active,

    iptables -L INPUT

The above command will output all the rules set for incoming/ingress traffic.

  1. tcpwrappers configured for allowing traffic for SSH from specific IP addresses/subnets only.

You can check the following two files to check whether tcpwrappers has been configured,

cat /etc/hosts.allow
cat /etc/hosts.deny 

If you see any IP address(es)/network configuration in any of the above files then you will need to add/allow the new IP address by adding the same in the respective file.

share|improve this answer

Your Answer


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

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