0
So as is usual I have a dual boot Kubunutu / Windows 7 box (with cygwin), at certain static IP of local 192.168.0.x range, and I want to SSH to it from my other boxes regardless of which system it's running.
The thing is - I configured Kubuntu and Windows 7 parts separately, so they have different ssh host key (that's inherent in these dual boot setup), but also usernames, and IdentityFile
(that is pretty awkward, I just didn't think much of it when I choose Windows 7 account name) and ssh goes crazy because every time I boot to a different OS it thinks someone is MITMing since key for same IP changed.
What's the best I can do here? Deleting ~/.ssh/known_hosts
and commenting out different part of ~/.ssh/config
every time I log in sort of works, but I'd rather solve it properly-ish.
Change the static IP: pick another, close one, have your client ping the first static IP; if it responds ssh into it, if it does not, ping the second IP, and if it responds ssh into it. – MariusMatutiae – 2014-02-09T20:47:35.603
IP is determined by NAT router and it depends on ethernet card's MAC. I could modify MAC in bootup/shutdown scripts, but that sounds like a very wrong thing to do. – taw – 2014-02-09T21:47:38.843
You can easily modify the static IP of your pc in both Windows and Linux, and disable the reserved IP address in the router. – MariusMatutiae – 2014-02-09T22:13:47.667