Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NAT and ssh
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
danielsbrewer
Tux's lil' helper
Tux's lil' helper


Joined: 04 Oct 2004
Posts: 135
Location: Epsom, UK

PostPosted: Fri Sep 23, 2005 1:37 pm    Post subject: NAT and ssh Reply with quote

My home network is behind a NAT and I have two ssh servers. The router is set up so that it forwards port 22 to one server and port 1022 to the other. The problem I am having is with the client side. Basically every time I ssh into a different server ssh complains that the remote host has changed. I can only get to the other machine by deleting the entry in the known_hosts file. EVen when I do that it complains about the key being different to the ip-address key.

Is there a good way to get around this?

Thanks
Back to top
View user's profile Send private message
danielsbrewer
Tux's lil' helper
Tux's lil' helper


Joined: 04 Oct 2004
Posts: 135
Location: Epsom, UK

PostPosted: Fri Sep 23, 2005 1:53 pm    Post subject: Reply with quote

Sorry, I have worked out how to do it. For those that are interested, you just need to change your .ssh/config a bit to have this:

Host home
Hostname www.example.com
Port 1022
HostKeyAlias home
CheckHostIP no
User example


The HostKeyAlias gives t an independent hostkey and CheckHostIP ensures that it doesn't check the ip.

Dan
Back to top
View user's profile Send private message
jetblack101
n00b
n00b


Joined: 17 Jan 2005
Posts: 16

PostPosted: Fri Oct 21, 2005 2:22 am    Post subject: Reply with quote

thank you so much this was driving me crazy!
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