?
Solved

Linux, scripts, scp, and eliminating password authentication

Posted on 2013-12-19
3
Medium Priority
?
1,054 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month8 days, 17 hours left to enroll

764 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