LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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, 12:15 PM   #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, 12:47 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
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, 06: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, 06:28 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
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, 06: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, 11:20 AM   #6
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 331

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:15 AM
passphraseless dsa key neocontrol Linux - Software 8 07-11-2006 03: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 06:28 AM
How do I get a DSA public key ??? amp2000 Linux - General 5 12-17-2003 04:30 PM
warning: curl-7.10.3-1.i386.rpm: V3 DSA signature: NOKEY, key ID df3d5207 Lespuff Linux - Newbie 2 12-01-2003 12:25 AM


All times are GMT -5. The time now is 04:54 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration