Solved

Linux, scripts, scp, and eliminating password authentication

Posted on 2013-12-19
3
880 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now