LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-28-2012, 10:34 AM   #1
Springs
Member
 
Registered: Apr 2008
Posts: 73

Rep: Reputation: 0
Rsync to a 3rd party remote server without entering password


I'm using Rsync to backup data to a remote server i pay for.

The script i'm running means i have to enter the password each time i want to run it.

is there anyway i can automate it so it can be ran via cron later on?

I don't have any access to the remote server as its not my own.

Thanks
 
Old 05-28-2012, 02:18 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Nowadays rsync default transfer protocol is ssh, hence you might setup public key authentication. Basically you have to create the private/public key pair on your local machine and copy the public key onto the remote server as $HOME/.ssh/authorized_keys. This is all explained in man ssh or in plenty of tutorials on-line, so I will not cover it here.

Two remarks only: if you don't have a direct ssh/scp access to the remote server, you can create the authorized_keys files in your local machine and rsync it to the remote server. Don't copy the public/private keys, only the authorized_keys file. The private key in particular must reside only on your local machine for the sake of security.

Second, once you have set-up the .ssh directory and the authorized_keys inside it with the proper permissions, you can use rsync like this:
Code:
rsync -av -e "ssh -i $HOME/.ssh/name_of_private_key" source user@host:destination
where name_of_private_key is the default name of the generated key pair or the custom name you have chosen. Hope this helps.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
3rd party library rosy Jovita Linux - Newbie 15 03-16-2010 04:08 AM
Sending 3rd party logs to remote syslog server OlRoy Linux - Server 3 12-24-2008 06:06 PM
Linksys Media Center Extender + 3rd party linux server software kurrupt Linux - Hardware 0 10-15-2005 09:13 AM
Safety of 3rd party cd's robby737 Linux - Security 5 06-16-2004 11:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:48 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