Solved

Linux, scripts, scp, and eliminating password authentication

Posted on 2013-12-19
3
958 Views
Last Modified: 2013-12-19
I am using RHEL 6.4   (Note:  my previous posts on this subject involved ssh, not scp)

I can get the scp utility to work well as in:

scp test.file root@xxclnt2:/home

Open in new window


However, I am required to enter a passowrd

I want to write a script that will perform 20 scp commands to 20 different systems

How can I do this with scp

Thanks
0
Comment
Question by:Los Angeles1
  • 2
3 Comments
 

Author Comment

by:Los Angeles1
ID: 39729926
I meant so toy, how can I do this without entering a password

Thanks
0
 

Author Comment

by:Los Angeles1
ID: 39729928
Or is that possible ?
0
 
LVL 40

Accepted Solution

by:
omarfarid earned 500 total points
ID: 39730071
yes, it is possible. You need to set trust between the systems' users (basically ssh or scp without password based on keys). Please how to do so in the link below

http://www.linuxproblem.org/art_9.html

Then you can set a loop to do scp like

cat hostsfile | while read host
do
    scp test.file root@$host:/home
done
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
wifi not working on Raspberry Pi 3? 2 116
Linux server had an unexpected freeze. How to find out cause (sys logs)? 13 61
Upgrade BIOS / EUFI at Scale 4 72
Linux 3 39
Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question