Warning: the DSA host key for '' differs from the key for the IP
I have to connect to two different URLs, which share the same IP address. The first one I connected to worked fine, and still does. The second one give the following message:
Warning: the DSA host key for 'URL' differs from the key for the IP address 'xxx.xxx.xxx.xxx' The system asks whether i wish to proceed, I answer yes, and it connects just fine. However, i have automated SFTP process that will login in the same manner... SSH? So the first one I tried works fine, but the second fails because I would need to supply a "Yes" during the automated process. My question is, can I add the second URL to the key that currently has the first URL and corresponding IP? Kindest regards to all, |
You can use the StrictHostKeyChecking option in SSH to ignore the check and proceed anyway:
Code:
ssh -o StrictHostKeyChecking=no user@ip |
permanently ignore the check?
Quote:
Thanks for the info, |
Not sure if you can globally disable it, but you can always add an alias so every time you type "ssh", it actually runs "ssh -o StrictHostKeyChecking=no".
|
cause i won't be typing it in, its a php program that executs the connection. I'm looking at the code to see if i can squeeze that stricthostchecking=no. but don't think its so straight forwards. I see where the code ... i'll dig deeper and post again, when i know what to post.
thanks a million! |
Just correct the corresponding hostname in ~/.ssh/known_hosts.
|
All times are GMT -5. The time now is 11:02 PM. |