LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-24-2017, 02:23 AM   #1
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Rep: Reputation: 8
RSYNC over SSH using OpenWRT and Seagate Personal Cloud


I have possibility to use 2,5 GB Internet link in geographically distant location for backup needs. So I want to use TP-Link Gigabit router WR-1043WD with OpenWRT installed on it. There is Seagate Personal Cloud 3,5'' 4TB connected to router over Ethernet cable. Seagate Personal Cloud has possibility to run RSYNC client and server, but there is no SSH on it. I dont want to install alternative software on Seagate Personal Cloud because of warranty. But of course it is very simple to run SSH and RSYNC on OpenWRT. My idea is to RSYNC over SSH data from home server to the distant location mentioned before. My question is. How can I tunnel RSYNC traffic over SSH to router and than RSYNC without SSH data with Seagate Personal Cloud in clear (unencrypted) form?
 
Old 02-24-2017, 02:53 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
that looks like a simple port forwarding. You need to run rsync server on your Seagate Personal Cloud and you need to specify a server port (default is 873). But I still do not understand how do you want to reach what, from where and over ssh/rsync or ??
 
Old 02-24-2017, 03:16 AM   #3
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
I want to create ssh tunnel between my home server and OpenWRT router and than RSYNC data from server to Seagate Personal Cloud unit connected to router. Of course I can use OpenVPN instead but I think that SSH tunel is more easy to use and maintain.
 
Old 02-24-2017, 03:19 AM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,309
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Is there any way to get SSH on the "Seagate Personal Cloud" device? Then it would be a matter of simple port forwarding from the TP-Link
 
Old 02-24-2017, 03:28 AM   #5
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
This is exactly my problem. There is no way to run SSH on Seagate. As I wrote, it is possible to install alternative firmware on Seagate (with SSH - dropbear installed) but I will lost 3 years warranty.
 
Old 02-24-2017, 03:29 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
if there was no ssh server on your Seagate Personal Cloud device you cannot ssh tunnel onto it. But you can forward a port from your router to that device and you can rsync using your router's ip/port.
 
Old 02-24-2017, 03:43 AM   #7
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,309
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Yes, if you can SSH to or via the router, I'm pretty sure you can have SSH do the forwarding so that at least the external connection is encrypted. You'll have to know which port rsync on the "Seagate Personal Cloud" uses to listen.

Code:
ssh -L 8873:seagate:873 router.example.org
Then you should be able to rsync to localhost and it will be forwarded via the router to the Seagate.

Just a guess.
 
Old 02-24-2017, 03:43 AM   #8
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
Yes I can forward port but transmission over Internet will not be encrypted
 
Old 02-24-2017, 03:48 AM   #9
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
Quote:
Originally Posted by Turbocapitalist View Post
Yes, if you can SSH to or via the router, I'm pretty sure you can have SSH do the forwarding so that at least the external connection is encrypted. You'll have to know which port rsync on the "Seagate Personal Cloud" uses to listen.

Code:
ssh -L 8873:seagate:873 router.example.org
Then you should be able to rsync to localhost and it will be forwarded via the router to the Seagate.

Just a guess.
Yep. It should work. I will try.
 
Old 02-24-2017, 06:00 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
and again, if there was no ssh (server/client) on seagate you cannot make encrypted connection. Tunnelling might work.
 
Old 02-25-2017, 04:05 AM   #11
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
Problem totally resolved. New version of Seagate firmware, allows RSYNC over SSH natively !!! Good boys....
 
1 members found this post helpful.
Old 03-16-2017, 12:35 PM   #12
jdeck
LQ Newbie
 
Registered: Mar 2017
Posts: 2

Rep: Reputation: Disabled
Hi mackowiakp,

What rsync command are you using with your Seagate?

I have a Seagate Personal Cloud 2 Bay running firmware version 4.2.13.0 and no matter what I try, I get this error:

Code:
# /usr/bin/rsync -v netbackup@192.168.2.43:./
netbackup@192.168.2.43's password: 
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.0]
Thanks!
 
Old 03-16-2017, 12:59 PM   #13
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
RSYNC implementation in Seagate is very primitive. It has only one rsync instance. So correct syntax should be:

Code:
/usr/bin/rsync -v /source_dir netbackup@192.168.2.43::NetBackup
And You will have /source_dir copied to NetBackup dir on Seagate GUI
 
1 members found this post helpful.
Old 03-16-2017, 01:09 PM   #14
jdeck
LQ Newbie
 
Registered: Mar 2017
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by mackowiakp View Post
Code:
/usr/bin/rsync -v /source_dir netbackup@192.168.2.43::NetBackup
Thanks so much. Darned double colon!!!
 
  


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
ssh/rsync to Seagate NAS? erik2282 Linux - General 2 12-20-2015 09:30 PM
LXer: Seagate, Scality Partner On Software-Based Storage for the Cloud LXer Syndicated Linux News 0 04-03-2014 11:41 PM
Personal Cloud? gael33 Linux - Newbie 6 03-13-2014 05:00 PM
LXer: OpenStack: Seagate, HP Promote Cloud Platform Ahead of Conference LXer Syndicated Linux News 0 02-21-2013 06:00 AM
[SOLVED] rsync fails in cron - ssh key prob for rsync? jonathansfl Linux - Server 6 12-09-2010 09:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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