Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SSH: known_hosts problem w new IP address is asigned by DHCP
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
andy64
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jul 2002
Posts: 78
Location: Munich, Germany

PostPosted: Tue Jun 22, 2004 9:06 pm    Post subject: SSH: known_hosts problem w new IP address is asigned by DHCP Reply with quote

I have a question for the SSH experts:

I'm trying to set up SSH between two of my PCs. I was successful in configuring everything so that it seems to work. But after a while I found the following problem:

both PCs are connected via a switch/router to the Internet (DSL access). After some time (usually more than a day), the DHCP server (?) inside the switch assigns different IP addresses to the PCs (192.168.1.10x).

When I then connect via SSH to the other machine, I get an warning, that possibly the host ssh key has changed or that there is a man-in-the-middle-attack.

When I check the file known_hosts, I see that it has the following format:

192.168.1.103 ssh-rsa AAAj8d74g487gd87gd8...[...]...hjgjzz=

whereas the id_dsa.pub has the following format:
ssh-dss gd9gdgh9d8dgh...[...]... zutM= name@localnet.net

the first file ("known_hosts") is generated automatically, if I say the new connection should be used (after the warning message)

In the first file the IP address is stored, while in the second the symbolic name is stored.

Isn't this a conceptual flaw? Instead of the IP of the host (which always can change), a name would be much better, e.g. serverx@localnet.net


How do I handle this case with changing IP addresses? Please don't recomment to configure the router to not change the IP address. I don't have access to the router and I think the DHCP is allowed the change the IP address. :?: :?: :?: :?: :?:
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Tue Jun 22, 2004 9:47 pm    Post subject: Reply with quote

Hi!

You will have to use the option CheckHostIP in ssh_config.
Set it to NO in order to disable it.
The intention behind this option is to prevent DNS spoofing.

HTH
T.
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum