Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 05-07-2004, 10:58 AM   #1
andi_germany
Confirmed User
 
Join Date: Oct 2002
Location: Germany
Posts: 768
rsync problem

Hi I am trying to backup my sites to a remote server. All seems to work if I do it manually using rsync via ssh2 but I have a problem as it promts me for the root password after I type the command. How can I include the password into the command so I can crontab it once per week.

Here is the syntax I am using:

rsync -varpogt --rsh="ssh2 -l admin" --rsync-path=/home/admin/rsync-2.5.5/rsync --exclude-from=/docs/rsync-exclude /data root@IP-address:/
__________________
SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.
andi_germany is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-07-2004, 11:25 AM   #2
rickholio
Confirmed User
 
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
The best way to handle this is to put your public key in the target server's "authorized_keys" file. It's pretty straightforward:

- If you haven't done so yet, generate a keypair for the account that will be doing the rsync:

(for ssh1): ssh-keygen -t rsa1
(for ssh2): ssh-keygen -t dsa

- Then copy the PUBLIC key (make sure it's the public half!) to the target machine and add it to the authorized key list.

(for ssh1):
scp ~/.ssh/identity.pub targetbox:/
ssh targetbox
cat /identity.pub >> ~targetuser/.ssh/authorized_keys

(for ssh2):
scp ~/.ssh/id_dsa.pub targetbox:/
ssh targetbox
cat /id_dsa.pub >> ~targetuser/.ssh/authorized_keys2

You can also rm the public key from the root dir of your target box, if you like.

After that, you should be able to simply do an ssh from your source box to your target box and it won't ask you for the password.

HTH. HAND.

Last edited by rickholio; 05-07-2004 at 11:26 AM..
rickholio is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-07-2004, 11:39 AM   #3
rickholio
Confirmed User
 
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
Hit me up on ICQ: 4435025 or AIM: rickholio if you run into problems. I'll hook ya up.
rickholio is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-07-2004, 11:42 AM   #4
andi_germany
Confirmed User
 
Join Date: Oct 2002
Location: Germany
Posts: 768
Thanks I think I can figure this out.
__________________
SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.
andi_germany is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-07-2004, 11:45 AM   #5
FrankWhite
Confirmed User
 
FrankWhite's Avatar
 
Join Date: Nov 2002
Location: nyc
Posts: 3,540
use ttcp
FrankWhite is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.