Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8018385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:07:02+00:00 2026-06-04T21:07:02+00:00

I need to automate passwordless access to ec2 instances in a master/slave configuration. So

  • 0

I need to automate passwordless access to ec2 instances in a master/slave configuration.

So for it works but I suspect I hit a snag.

The below are the steps for allowing the ec2 master to ssh into a ec2 slave.

On the master I do the following:

cd /home/ubuntu/.ssh
ssh-keygen -f id_rsa -t rsa -N ''
eval `ssh-agent`
ssh-add ~/.ssh/id_rsa 

On the slave I add the above generated id_rsa.pub file to:

/home/ubuntu/.ssh/authorized_keys

So…issue is that that when I ssh into a machine it asks for the following:

RSA key fingerprint is b4:50:7e:5c:5f:41:f5:cd:95:91:78:5b:8a:1f:97:df.
Are you sure you want to continue connecting (yes/no)?

The program I am trying to run;tsung, seems to not work with the prompt even though a password is now not required. So, the programn fails. If I ssh into the slave, thus adding the key, then all works now that hte yes/no is no longer asked. So..the question is, how do I automate the removing the prompt? I can write a script to automatomate e.g. pexpect but that seems long winded.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T21:07:03+00:00Added an answer on June 4, 2026 at 9:07 pm

    You can use ssh-keyscan (typically part of OpenSSH distributions) to get the server’s host key and store it in a known_hosts file. Once the key is in that file, no further prompts will show up. See the ssh-keyscan manpage for details.

    There is, of course, a reason SSH asks you to verify the identity of the server, so doing this exposes you to certain security risks. Depending on how you create your instances, you may be able to fix this by (a) using the same host key on the server every time and (b) including it in your client image (or whatever you do).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to automate the migration from an Access (2003) to an SQL Server
I need to automate logging into a TELNET session using expect , but I
I need to automate search functionality as below: Search string = (X* OR Y)
I have an access database, with a query made. I need to automate it
I need to automate web browsers in the following scenario : I have a
I need to automate the UI testing of an iPhone application, i.e. if in
I need to automate an IM client to update a status every few hours,
I need to automate navigation around a JavaScript powered website in Python so I
I need to automate a process whereby attachments are automatically downloaded from messages in
I need to automate my app by passing a series of parameters to it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.