LinuxQuestions.org
Review your favorite Linux distribution.
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 06-17-2009, 10:42 AM   #1
PlatinumX
Member
 
Registered: May 2008
Location: France
Distribution: Debian / Fedora / Gentoo
Posts: 178

Rep: Reputation: 15
SFTP/SCP vs VPN


Hey all,

I need to transfer a huge amount of data between 2 sites.
Both side of the transfert run Linux systems.
Data must be protected in confidentiality.

However, the upload capability is quite low on each sites (connected through ADSL).

At the moment, i use SFTP to transfert data between each sites.
However, i wondered if having a VPN between the two sites, and performing a classic FTP transfert would be better on a performance point of view.

Any idea ?

Thanks
 
Old 06-17-2009, 12:23 PM   #2
zer0x333
Member
 
Registered: Oct 2007
Posts: 31

Rep: Reputation: 16
rsync

If its just file transfer you want, I would keep it simple and stick with ssh based methods. I would imagine the overhead is less.. ?

I would recommend rsync for transferring large amounts of data, it has many benefits over the sftp method.

http://rsync.samba.org

zer0x
 
Old 06-17-2009, 12:43 PM   #3
grepmasterd
Member
 
Registered: Aug 2003
Location: Seattle
Distribution: ubuntu, lately
Posts: 182
Blog Entries: 1

Rep: Reputation: 35
ssh uses very little overhead once the setup is finalized. vpns typically tunnel traffic, so there is usually 20-40 bytes of overhead per packet.

rsync over ssh is a good option.
 
Old 06-17-2009, 12:44 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
@PlatinumX: as you know, both ssh and vpn get you encryption on the wire. As for which will be quicker given your circumstances, I have no idea. You could do some performance testing with a small amount of sample data.

rsync is a good idea if you're going to be doing a one-time large data transfer and then keeping it in sync afterwards.
 
Old 06-18-2009, 01:04 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
rsync really only gains on multiple uploads of nearly the same data. If its a one-off, go the easy way with scp.
 
Old 06-18-2009, 09:01 AM   #6
PlatinumX
Member
 
Registered: May 2008
Location: France
Distribution: Debian / Fedora / Gentoo
Posts: 178

Original Poster
Rep: Reputation: 15
I can't use rsync because it is not a synchronisation.
It is a transfert of log file to a central point.

Ok, i will stay on SCP.
 
Old 06-18-2009, 04:32 PM   #7
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
It might sound obvious, but it's worth mentioning anyway: compress the log file first.
 
Old 06-19-2009, 02:22 AM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Just to clarify, you 'could' use rsync, because although rsync only txfrs 'differences', the diff between the whole file at src and nothing at target, is indeed the whole file
However, scp would be simpler & quicker (and yes, gzip it first, looking at the compression options - level 9 is highest compression, but slowest to do iirc)
 
Old 06-19-2009, 04:03 AM   #9
PlatinumX
Member
 
Registered: May 2008
Location: France
Distribution: Debian / Fedora / Gentoo
Posts: 178

Original Poster
Rep: Reputation: 15
I am 7zip-ing it before transmitting
 
Old 06-19-2009, 07:26 AM   #10
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,665
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
A nice advantage of VPN is that you can do it in hardware. So, you can set up a router on each end (or use the VPN capabilities that might well be already available on what's already there), and arrange for both of them to exchange everything that must pass between them securely.

As long as you know that this is working correctly, and that nothing will ever be passed "in the clear," then you now have a secure channel that you can "just forget about." The encryption takes place but it is entirely transparent to you.

It is critically important that you use digital certificates (self-generated is fine...) to secure the link: don't rely upon "shared secrets" (passwords). This will allow the two routers not only to provide truly-secure communication with each other, but to identify each other.
 
  


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
scp vs. sftp Holyninja Linux - Newbie 1 10-29-2007 06:28 PM
allow ssh, scp and sftp? javier_ccs Linux - Newbie 6 09-12-2006 08:11 AM
perl and sftp or scp gazman1 Programming 2 06-21-2006 09:29 AM
SSH - where are scp and sftp satimis Linux - Networking 2 11-15-2003 10:27 AM
scp vs. sftp . . . zthomasz Linux - Security 2 07-08-2003 08:26 AM

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

All times are GMT -5. The time now is 05:30 AM.

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