LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-10-2012, 11:15 AM   #1
medirecpr
LQ Newbie
 
Registered: Apr 2012
Posts: 17

Rep: Reputation: Disabled
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,
 
Old 04-10-2012, 11:47 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
You can use the StrictHostKeyChecking option in SSH to ignore the check and proceed anyway:

Code:
ssh -o StrictHostKeyChecking=no user@ip
 
1 members found this post helpful.
Old 04-10-2012, 05:24 PM   #3
medirecpr
LQ Newbie
 
Registered: Apr 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
permanently ignore the check?

Quote:
Originally Posted by suicidaleggroll View Post
You can use the StrictHostKeyChecking option in SSH to ignore the check and proceed anyway:

Code:
ssh -o StrictHostKeyChecking=no user@ip
Can I turn this off permanently? a setting perhaps, so it does not use the StrictHostChecking at all? I trust the servers I am connecting to.

Thanks for the info,
 
Old 04-10-2012, 05:28 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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".
 
Old 04-10-2012, 05:39 PM   #5
medirecpr
LQ Newbie
 
Registered: Apr 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
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!
 
Old 10-12-2014, 10:20 AM   #6
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 492

Rep: Reputation: 45
Just correct the corresponding hostname in ~/.ssh/known_hosts.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Which is better RSA or DSA public key? tarballedtux Linux - Security 12 02-03-2009 06:15 AM
passphraseless dsa key neocontrol Linux - Software 8 07-11-2006 02:51 PM
warning: clamav-0.87.1-1.1.fc2.rf.i386.rpm: V3 DSA signature: NOKEY, key ID 6b8d79e6 Niceman2005 Linux - Software 4 03-07-2006 05:28 AM
How do I get a DSA public key ??? amp2000 Linux - General 5 12-17-2003 03:30 PM
warning: curl-7.10.3-1.i386.rpm: V3 DSA signature: NOKEY, key ID df3d5207 Lespuff Linux - Newbie 2 11-30-2003 11:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration