LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-22-2004, 10:38 AM   #1
Phaethar
Member
 
Registered: Oct 2003
Location: MN
Distribution: CentOS, Fedora
Posts: 182

Rep: Reputation: 30
Rsync and SSH


I'm trying to set up a job that I can run through Cron that will copy all data from 1 PC to another. It's going to be at a different location, so I want to get it set up to use SSH. I've been able to get all the config files set up, and it copies all the right data... only problem is that it always asks me for a password before it will move any data. I'm trying to figure out why it's doing that. From reading the man pages, it sounds like I just need to add the "auth users = <username>" and the "secrets file = /location" options to the rsyncd.conf file. I've put them both in, and have the secrects file set up with the usernameassword listed on the first line, just as it says. The command I'm running looks like this:

Quote:
rsync --verbose --progress --stats --compress --rsh="ssh" --recursive --times --perms --links --delete /source/* hostname:/destination
It then prompts me for the username for the user. After it's entered, it runs perfectly, copying everything over that's changed. The destination system is running in daemon mode.. and I just don't know why it continues to ask for a password. Is there a way to store the UN/PW in a file somewhere so I can automate this? Thanks for any advice.
 
Old 03-22-2004, 12:22 PM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Don't use a username and password. Use public key authentication as described here
 
Old 03-22-2004, 02:27 PM   #3
linuxboy69
Member
 
Registered: Oct 2003
Distribution: Redhat 9
Posts: 138

Rep: Reputation: 15
I use rsync to copy information from our production server to our webservers using rsync without authentication using ssh keys on a cron. It is great and very fast.
 
Old 03-22-2004, 03:18 PM   #4
Phaethar
Member
 
Registered: Oct 2003
Location: MN
Distribution: CentOS, Fedora
Posts: 182

Original Poster
Rep: Reputation: 30
Thanks for the tip Hangdog42, I set it up using the public key authentication and everything works great now. I have things running every 20 minutes, and it's very fast so far.

Thanks again.
 
  


Reply



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
rsync->ssh port lackluster Linux - Software 2 05-27-2007 08:42 PM
rsync and ssh? IchBin Linux - Newbie 4 02-13-2005 03:41 PM
rsync and ssh port ohcarol Linux - Software 2 12-22-2004 10:29 AM
Rsync vs ssh satimis Linux - Software 7 04-04-2004 06:58 AM
SSH and RSYNC problem pixie Linux - General 2 03-02-2004 11:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:19 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
Open Source Consulting | Domain Registration