# One Gentoo Box to Another

## gentoo_newguy

Hi I have aload of big files on My gentoo Box. 

I want to move them some how over the network to my other gentoo box.

What would be the best and eastiest way to do this ? 

Maybe samba or nfs ? 

Could anyone get me started ? 

Thanks

----------

## monsm

I am just in the process of setting up a second Gentoo box on my home network.  I am thinking nfs myself, but thats only because I haven't got any Windows machines, so don't need samba.  If you already have windows machines and have installed samba, then that should do the job.

A third alternative is to use ftp between the two, especially if you don't plan to share any network drives between the boxes.

Mons

----------

## nativemad

Hi,

I use scp or even rsync over ssh quite a lot. This is quite nice, as it only uses ssh!  :Wink: 

scp -r /local/dir/to/copy user@remote-host:/remote/path     <-or the other way around

rsync -urlvopgt --del /local/dir user@remote-host:/remote/path   <-or also the other way around

Cheers

----------

## gentoo_newguy

Hi ok i will give one of these ago. 

Thanks guys

----------

## theotherjoe

sys-fs/sshfs-fuse might also be of interest for you

if you dont want to fiddle with nfs

----------

## Hu

Copying via ssh, whether directly or indirectly, imposes some overhead due to the cryptographic calculations.  If you are on a trusted network, you can avoid the overhead by copying through some other means.  Using rsync through the rsync daemon, rather than with ssh transport, is one option.  If you know in advance that there will be little or no savings from using rsync, you could instead do:

on recipient: socat tcp4-listen:3841 - | tar -x -f -

on sender: tar -c -f - /my/files > /dev/tcp/recipient/3841

This requires net-misc/socat on the recipient.  It assumes that the sender is using bash, since the /dev/tcp/ redirection is a GNU bash feature.  Caution: this technique has NO security whatsoever, so it is only suitable for copying data where you cannot be monitored by an untrusted user.

----------

## davascript

 *Hu wrote:*   

> Copying via ssh, whether directly or indirectly, imposes some overhead due to the cryptographic calculations.  If you are on a trusted network, you can avoid the overhead by copying through some other means.  Using rsync through the rsync daemon, rather than with ssh transport, is one option.  If you know in advance that there will be little or no savings from using rsync, you could instead do:
> 
> on recipient: socat tcp4-listen:3841 - | tar -x -f -
> 
> on sender: tar -c -f - /my/files > /dev/tcp/recipient/3841
> ...

 

pwned!  i think this is the best answer you will get.  i was thinking of helping with a samba config but why!  this is a great method!

----------

## GODhack

I will superPWN now muhaha (emerge netcat a.k.a. "program suitable for all internet tasks" before trying this):

```

#PC a says: WE need and wait for newfile!:

nc –l –p 1234 >newfile

#PC b says: WE send newfile:

nc destination 1234 <origfile

```

1234 can be any number just quite large if you are not root and same on both PC's.

 :Wink: 

Check man nc if you want to see how cute netcat is.

----------

## Spankin Partier

^^^ Thanks GODhack!  I've been looking for netcat on Gentoo all day.  Other distros use the command netcat.  But apparently Gentoo had the command renamed the command to nc.  I went so far as to copy netcat from a Knoppix CD over to Gentoo just to get my task done.   :Embarassed:   Now I know its proper name I can get rid of that.

Thanks  :Smile: 

----------

