Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Linux, scripts, scp, and eliminating password authentication

Posted on 2013-12-19
3
Medium Priority
?
1,096 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Fine Tune your automatic Updates for Ubuntu / Debian
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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ā€¦
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

610 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