LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Tags used in this thread
Popular LQ Tags ,

Reply
 
Thread Tools
Old 09-01-2009, 03:59 PM   #1
bubnoff
Member
 
Registered: Jun 2009
Location: Northwest
Distribution: Slackware
Posts: 38
Thanked: 1
Rsync: Is it smarter to push, or smarter to pull?


[Log in to get rid of this advertisement]
I've heard some time ago that you should always pull from
the destination rather than push from the source. Can't recall
the reasoning ...seems that there would be risk involved either way.

Like many of you, I am syncing to a web server and am just curious
as to which method you choose and why.

I am using this command on a cron job:
Code:
rsync -az -e ssh --delete ~/goodies/* fakeuser@fakehost:/webroot/blah/
Should I be pulling from the server instead of pushing from the client?

Also, what is your take on passphrase-less keys a la ssh-keygen?

This maneuver has to be scripted as the content is auto-generated from
a database and refreshed every Monday. If you know of a more secure way
to script/schedule this without using passphrase-less ssh keys or some
clumsy expect script, your advice would be much appreciated.

Thanks for reading!

Bub
bubnoff is offline  
Tag This Post ,
Reply With Quote
Old 09-01-2009, 04:05 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Fedora, FreeBSD
Posts: 2,386
Thanked: 81
Quote:
Originally Posted by bubnoff
Should I be pulling from the server instead of pushing from the client?
Whether pushing or pulling, the source should be the volatile (changing) directory. Also, do not select a destination that you can't afford to lose data on if you're using rsync's --delete option.

Quote:
Originally Posted by bubnoff
Also, what is your take on passphrase-less keys a la ssh-keygen?
They're handy and I use them. Keep the host / account that has access to the private keys safe.
linuxfedora anomie is offline     Reply With Quote
Thanked by:
Old 09-01-2009, 05:30 PM   #3
bubnoff
Member
 
Registered: Jun 2009
Location: Northwest
Distribution: Slackware
Posts: 38
Thanked: 1

Original Poster
scp vs. rsync

Thanks, I'll ditch the --delete option.

One last question; other than rsync only syncing changes, does it have other advantages over scp?

These are small files to begin with.

Thanks!

Bub
bubnoff is offline     Reply With Quote
Old 09-01-2009, 05:42 PM   #4
ShadowCat8
LQ Newbie
 
Registered: Nov 2004
Location: Arcadia, CA
Distribution: Gentoo (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 24
Thanked: 1
Well, IMHO, rsync is a *lot* more fault-tolerant from a network end than scp is. If you lose a few packets from an rsync transfer, or even take a full network-hiccup, the rsync will hold it's session and be able to continue it's transfer if the network comes back before it's full timeout is reached.

Scp tends to error directly out if the connection is broken at any time. (At least that is my experience.)

HTH.
linux ShadowCat8 is offline     Reply With Quote
Thanked by:
Old 09-02-2009, 11:54 PM   #5
unixfool
Member
 
Registered: May 2005
Location: Northern VA
Distribution: Slackware, Freebsd, OpenBSD, Mac OS X , Backtrack, Slamd64, Ubuntu on a Dell Mini 9
Posts: 468
Blog Entries: 7
Thanked: 6
Quote:
Originally Posted by bubnoff View Post

Also, what is your take on passphrase-less keys a la ssh-keygen?
http://www.debian-administration.org/articles/152

http://www.mikehan.com/ssh/advanced.html (Keys without Passphrases section)

http://blogs.verilab.com/partain/200...sword-rap.html (summary at the bottom of the page)

This is a big no-no and goes against basic security. SSH is only as safe as the private key. If that doesn't have a passphrase and someone gains a copy, they've the keys to the kingdom, provided they know which door it goes to (then again, if they've gained your key, they probably have an inkling of where to use it). A lot of people take the easy way out by not using passphrases on their keys, instead of using ssh-agent. IMO, ssh-agent is the better way...it was created to assist in remote access without having to always enter a passphrase.

Last edited by unixfool; 09-03-2009 at 12:01 AM..
linuxubuntu unixfool is offline     Reply With Quote
Thanked by:
Old 09-03-2009, 02:27 PM   #6
bubnoff
Member
 
Registered: Jun 2009
Location: Northwest
Distribution: Slackware
Posts: 38
Thanked: 1

Original Poster
Thanks! I will look into using the ssh-agent.

Bub
bubnoff is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
LQ should come up with a smarter way of ranking users rob124 LQ Suggestions & Feedback 67 09-11-2009 01:58 PM
ssh is smarter than I am rbees Linux - Security 3 02-22-2009 08:23 AM
Smarter Eclipse Diff Tool?? student04 Linux - Software 0 02-16-2008 12:44 AM
making a smarter shut down scripts zymos Linux - General 4 05-10-2006 02:00 PM
knoppix is smarter than i am soylentgreen Slackware 14 08-05-2005 02:35 PM


All times are GMT -5. The time now is 02:29 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration