calling rsync without promting to input password


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users calling rsync without promting to input password
# 1  
Old 03-22-2005
calling rsync without promting to input password

Hi ,
I am trying to call rsync from a perl script. I do not want to get promted for each file transfer.
Is there is any way i can avoid prompting for password?
I tried to store it in file and use rsync --password-file option.
Command :
Code:
$rsync --password-file=pass.txt -crgpto -e /usr/bin/ssh2 -v --rsync-path=/binlib/local/bin/rsync src  dest

But i still get promt to enter the password.

Any pointers ????

Thanks
Mandira

Last edited by Yogesh Sawant; 12-10-2010 at 05:13 AM.. Reason: added code tags
# 2  
Old 03-22-2005
From the man page of rsync:


Quote:
--password-file
This option allows you to provide a password in a file for
accessing a remote rsync server. Note that this option is only
useful when accessing a rsync server using the built in
transport, not when using a remote shell as the transport
. The
file must not be world readable. It should contain just the
password as a single line.
Why not just create a passwordless key for that user and stick it in .ssh/authorized_keys on the target server?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Emergency UNIX and Linux Support

How to provide password for rsync in shell script?

Hi, i want to call the rsync in a shell script so that i can run it in background by passing the password within script itself. Can any one please let me know how can i provide the password in the shell script itself so that rsync will read the password when promted by the script. Its very... (11 Replies)
Discussion started by: Little
11 Replies

2. Shell Programming and Scripting

Password check in bash script calling on expect

password check in bash script calling on expect Background: I have to copy a file from one server, to over 100 servers in a test environment. once the file is copied, it requires to have the permissions on the file changed/verified. These are all linux servers. most of them have the same... (1 Reply)
Discussion started by: 2legit2quit
1 Replies

3. Shell Programming and Scripting

Help with calling to file for a username and password combo

Hokay...first post, and I have been doing Linux scripting for a total of 2 days now. I think I am doing pretty well, but awk and arrays(what I think I need here) is a bit above me so far. I have written a script that will take and either create or modify 5 users, and passwords. It checks... (6 Replies)
Discussion started by: cashman04
6 Replies

4. Shell Programming and Scripting

Input Password

I am writing a script that can automatically login to Storage CAM console. i use this command, ./sscs login -u user -h localhost. at that time it will prompt for password, is it possible for store password in a file and supply it when it waits for password. Thanks in advance. Regards SK (1 Reply)
Discussion started by: cutechaps
1 Replies

5. UNIX for Dummies Questions & Answers

Help with Promting users to move the script along:

Hi guys, Simple question really (only when you know how!) I would like to clear the screen between two parts of script. However I would like the user to be prompted if he/she has completed reading the output from the first part of the script before moving on. i.e = grep "$###" #####... (2 Replies)
Discussion started by: SDKC
2 Replies

6. Shell Programming and Scripting

usinf STDIN or ARGV, taking the input, calling the library and printing results

Good morning!! I wrote a script and Im not the best at Perl so I would like someone to look it over....just in case. Ive been working on this script forever!! The script is supposed to: Have the user enter a number using STDIN. Calculate the average of the numbers, the total of all of the... (0 Replies)
Discussion started by: bigben1220
0 Replies

7. OS X (Apple)

get around rsync password prompt

Hey there, I'm trying to do a very simple rsync to back up my computer to an external drive connected via usb every night, but it keeps asking for a password. I tried using the password file flag, but it looks like that is only a daemon. Does anyone have any ideas? This has eaten up a lot of my... (4 Replies)
Discussion started by: aarond
4 Replies

8. Shell Programming and Scripting

rsync - storing password in script

Hello, I wish to store the password in an rsync script so that when prompted it just enters the password. I know I can set up passwordless logins, but I have never been able to do this on this particular server so I am resorting to storing the password in the script: rsync -avz -e ssh... (4 Replies)
Discussion started by: stuaz
4 Replies

9. Shell Programming and Scripting

rsync without password prompt

Hi, I am tranfering the files from local machine to remote machine using rsync utility but it is prompting password. but i don't want to provide through prompt. how can i give in my shell script. can anyone suggest me.Thanks in advance rsync -rvcpogtl -e "ssh $LOCAL_PORT" $SOURCE_DIR... (1 Reply)
Discussion started by: KiranKumarKarre
1 Replies

10. Shell Programming and Scripting

Input Password

I have a script which connects to database. I want user to input user name and password but dont want the password characters to be displayed on screen. How can i accept input from user in encrypted form. (2 Replies)
Discussion started by: baglasumit21
2 Replies
Login or Register to Ask a Question