Cynosure.X International LLC

: :

Add Comment | Related Links | TrackBack
Related Content

RelayTransfer.sh (GPL)

Have you ever wanted to transfer some files from your computer to a computer on a different network. Your computer can't talk directly to that computer. So you'll have to first transfer the files to a relay computer that could see both network. Then transfer the files over to the destination computer and finally clean up all the files on the relay computer. That's a lot of of work if you have the repeat that process all the time.

This is where RelayTransfer.sh comes in handy. RelayTransfer.sh does the work for you. You just have to specify the files you want to transfer, the destination for the files, and the relay computer that will do the transfer. After specifying that, RelayTransfer.sh will do all the work. Because RelayTransfer.sh is written as a command-line Bourne shell script, it can be used in your own custom scripts. You can use it to automate your transfers.

RelayTransfer.sh takes advantage of the GetTempDirPath.ksh (GPL) Korn shell script, the GetTempPathName.ksh (GPL) Korn shell script, the TransferBroker.sh (GPL) Bourne shell script. These scripts are also available on this site. So to use the RelayTransfer.sh script, you will need to download these other scripts if you don't already have them.

RelayTransfer.sh is distributed as executable source code under the GNU General Public License. Please see the license agreement elsewhere on this site.

Usage

RelayTransfer.sh "[USER@]HOST:SRC" "[USER@]HOST:DEST" "[USER@]Relay Host"

Attached File: RelayTransfer.sh (902 B)

Chieh Cheng
Mon, 05 May 2008 18:22:40 +0000

Note that the relay host has to have automated password authentication set up for both source and destination hosts. That is because there is no way to prompt you to enter them from the relay host.

If you are seeing messages that looks like the example below, then you probably do not have automated password authentication set-up.

  Permission denied (publickey,keyboard-interactive).
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(342)

Chieh Cheng
Tue, 24 Mar 2009 19:37:53 +0000

Once you have automated authentication set-up, you'll have to make sure that the source and destination host RSA key fingerprint are in the known_hosts file on the relay host. If you get the following error message, then it is likely that the RSA key fingerprint is missing.

  Host key verification failed.
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(342)

You can easily get the RSA key fingerprint in the known_hosts file by using ssh on the relay host to log into the source and destination hosts. Keep in mind that the fingerprint is different for IP address versus host name, even though they point to the same machine.

Chieh Cheng
Fri, 01 May 2009 02:56:30 +0000

I have made a slight improvement to "RelayTransfer.sh". When it cleans up the temporary directory that it created, it check to see if it exists first. This fix only effect folks using NFS mounts to the same location, where the temporary directory is located. The new version is attached below.

Attached File: 1 - RelayTransfer.sh (1 KB)

Chieh Cheng
Thu, 02 Jul 2009 23:14:20 +0000

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

TrackBack

TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

Title: rsync errors
Weblog: GearHack
Excerpt: From the other server, I get the following error message: protocol version mismatch - is your shell clean? (see the rsync man page for an explanation) rsync error: protocol incompatibility (code 2) at compat.c(60) Very particular problems indeed. I search on the web but got no viable results. . . .
Tracked: Sat, 20 Jun 2009 02:34:14 +0000

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 1 + 0?
Click button only once, please!

Messages, files, and images copyright by respective owners.

Products | Services
Forums | Latest | RSS
Library | Search | Wiki
Help | Licenses

Login | Register

46 Users Online

Hacking Digital Cameras
Fun for Photographers



Amazon Associate

Copyright © 1996 - 2024. All Rights Reserved.