LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Closed Thread
  Search this Thread
Old 05-13-2008, 01:37 PM   #1
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155
Blog Entries: 2

Rep: Reputation: 15
Question rsync


Hi ,

while rsync to take backup from other server. it will ask password.

I want to write the script that rsync from other server, while i run the script , it prompts me to enter password for that server. Is there any way to automatically supply password in the password prompt.
i know the parameter we can give but how to supply the password while asking interactively.

pls help me out
Thanks
 
Old 05-13-2008, 02:01 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,829
Blog Entries: 15

Rep: Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668
You don't need to write that.

If your script does something like:
rsync -avz -e ssh localdir user@remotehost/remotedir

The user will be prompted for password automatically when it tries to do the ssh to the remote host.

(The only thing that would prevent it being prompted is if you had established ssh trusts between the local user and the remote user. If you've done that there is no way to make it prompt anyway because ssh will detect it.)
 
Old 05-13-2008, 02:21 PM   #3
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155

Original Poster
Blog Entries: 2

Rep: Reputation: 15
Yes , I went through all the stuffs like
generating public key and copying public key to other server as authorized_keys but still it prompt for password...

not sure why?
 
Old 05-13-2008, 02:53 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,829
Blog Entries: 15

Rep: Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668
So you're essentially asking the same question as in the earlier thread. That makes this a duplicate post of:
http://www.linuxquestions.org/questi...8/#post3152151
 
Old 05-13-2008, 06:27 PM   #5
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Quote:
Originally Posted by jlightner View Post
So you're essentially asking the same question as in the earlier thread. That makes this a duplicate post of:
http://www.linuxquestions.org/questi...8/#post3152151
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cp or rsync szim90 Linux - Software 2 06-17-2007 12:11 AM
Rsync server vs rsync over ssh humbletech99 Linux - Networking 1 10-18-2006 12:10 PM
rsync knowkontrol Linux - General 4 10-23-2005 03:08 PM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 02:49 PM
Rsync help tricky1234 Solaris / OpenSolaris 3 09-07-2004 10:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration