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

  • Home
  • SEARCH
  • 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 70357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:43:05+00:00 2026-05-10T19:43:05+00:00

I had setup my clients & server for passwordless login. Like passwordless login by

  • 0

I had setup my clients & server for passwordless login. Like passwordless login by copying RSA key of server to all client’s /root/.ssh/id-rsa.pub. but this, I have done manually. I like to automate this process using shell script and providing password to the machines through script. If this problem is solved then I also want to use rsync to automate push items to all servers. Can any body help me in this regard.

Thank you

  • 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. 2026-05-10T19:43:06+00:00Added an answer on May 10, 2026 at 7:43 pm

    This script comes in Debian (and derivatives) machines, to distribute the keys. It’s called ssh-copy-id. You’d use it like this:

    ssh-copy-id [-i identity_file] [user@]machine 

    Then you’d enter the password and the copying would be done. You would do this one time only and then could use the rsync over ssh as usual.

    #!/bin/sh  # Shell script to install your identity.pub on a remote machine # Takes the remote machine name as an argument. # Obviously, the remote machine must accept password authentication, # or one of the other keys in your ssh-agent, for this to work.  ID_FILE='${HOME}/.ssh/identity.pub'  if [ '-i' = '$1' ]; then   shift   # check if we have 2 parameters left, if so the first is the new ID file   if [ -n '$2' ]; then     if expr '$1' : '.*\.pub' ; then       ID_FILE='$1'     else       ID_FILE='$1.pub'     fi     shift         # and this should leave $1 as the target name   fi else   if [ x$SSH_AUTH_SOCK != x ] ; then     GET_ID='$GET_ID ssh-add -L'   fi fi  if [ -z '`eval $GET_ID`' ] && [ -r '${ID_FILE}' ] ; then   GET_ID='cat ${ID_FILE}' fi  if [ -z '`eval $GET_ID`' ]; then   echo '$0: ERROR: No identities found' >&2   exit 1 fi  if [ '$#' -lt 1 ] || [ '$1' = '-h' ] || [ '$1' = '--help' ]; then   echo 'Usage: $0 [-i [identity_file]] [user@]machine' >&2   exit 1 fi  { eval '$GET_ID' ; } | ssh $1 'umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys' || exit 1  cat <<EOF Now try logging into the machine, with 'ssh '$1'', and check in:    .ssh/authorized_keys  to make sure we haven't added extra keys that you weren't expecting.  EOF 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 85k
  • Answers 85k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Are you sure it's white space and not Whitespace? May 11, 2026 at 5:07 pm
  • Editorial Team
    Editorial Team added an answer I assume you're using WampServer. Click the tray icon, select… May 11, 2026 at 5:07 pm
  • Editorial Team
    Editorial Team added an answer That's because the items in the collection are not part… May 11, 2026 at 5:07 pm

Related Questions

I wrote a device controller (rs232) and it is being used successfully, however users
XAMPP makes configuring a local LAMP stack for windows a breeze. So it's quite
Is this possible? I had troubles with SVN clients not being able to access
Ok, so let's say that I want to try virtualization in my environment. I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.