LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-14-2020, 08:59 AM   #1
steph007
LQ Newbie
 
Registered: Apr 2020
Posts: 7

Rep: Reputation: Disabled
Pb with connection to server Linux


hello ,

I run a script to see if a line is present in a file and I do this from a bounce machine which is allowed to access all the servers in the park, I have a total of 4300 servers.

When I run my shell script, I get the following two errors

error 1:
Matching host key in /root/.ssh/known_hosts:12042
Are you sure you want to continue connecting (yes / no)? yes
Warning: the ECDSA host key for '[myserverlinux1]: 77' differs from the key for the IP address '[xx, xx, xx, xx]: 77'
Offending key for IP in /root/.ssh/known_hosts:6424
Matching host key in /root/.ssh/known_hosts:12044
Are you sure you want to continue connecting (yes / no)?

error 2
sys @ ld000psp0001's password:

I want to find a solution so that my script ignores these two cases.

thnaks in advance .
 
Old 06-14-2020, 09:42 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
From the sparse information you give, I conclude that you should disable host key checking: https://www.shellhacks.com/disable-s...-key-checking/.
 
Old 06-15-2020, 12:22 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Technically that would work, but you might want to check whether you should/are allowed to do that....
 
Old 06-15-2020, 12:45 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by chrism01 View Post
Technically that would work, but you might want to check whether you should/are allowed to do that....
Since there are 4000 remote servers, a solution based on SSH certificates might be preferable. A known_hosts file with 4000 entries is monstrous.

Shameless plug (I am sure that there are many other and easier to read tutorials).
 
  


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
ssh: connection to host port: 22: Connection timed out lost connection cucolin@ Linux - Server 4 11-22-2011 06:15 AM
Connection from server but NO connection to server JoeneB Linux - Networking 8 10-19-2005 05:51 AM
LDAP SERVER Client Connection on SUSE 9.2 - connection error jcarton Linux - Networking 3 03-19-2005 12:40 PM
LDAP SERVER - CLIENT CONNECTION on suse 9.2 - connection error nicolasdiogo Linux - Networking 4 03-01-2005 01:43 PM
LDAP SERVER - CLIENT CONNECTION on suse 9.2 - connection error nicolasdiogo SUSE / openSUSE 0 03-01-2005 05:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:19 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