LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   File transfer between two linux boxes in a LAN (https://www.linuxquestions.org/questions/linux-newbie-8/file-transfer-between-two-linux-boxes-in-a-lan-90490/)

ganninu 09-08-2003 09:20 AM

File transfer between two linux boxes in a LAN
 
Is there a quicker way than setting a samba/ftp server on one of the machines in order two transfer files between two linuces in the same LAN?

rkwellstead 09-08-2003 09:45 AM

You can use nfs = Network File System, which is the Linux network file sharing equaivalent to windows file sharing (samba).

You will have to make sure that nfs is installed and working - which will vary according to your distro. When you have it installed and running, you simply add shares to /etc/exports file in the format:

/directory/to/share network/mask(options)

eg: /mnt/data 192.168.0.0/255.255.255.0(ro)

check 'man exports' for information on options. for now, ro = read only, rw = read write...

When you change a share in the /etc/exports file, run 'exportfs -r' probably as root, to reload the exports file. Then, from another machine on the network (in the allowed network/mask), use mount command to mount the nfs share like:

mount -t nfs remoteip:/directory/being/shared /local/directory

like the example above, eg: 'mount -t nfs 192.168.0.10:/mnt/data /mnt/nfs'

Hope that gets you on the right track...

Medievalist 09-08-2003 10:22 AM

Using NFS is like using a soft iron crowbar for a hammer. It'll work, but it's a lot of trouble....

Use SFTP to transfer files that you've never sent before. Use rsync over ssh (rsync --rsh="ssh -2" source destination) to synchronize files that already exist on both hosts very rapidly.

Rsync is worth learning. SSH/SFTP even more so.

rkwellstead 09-08-2003 10:46 AM

Ok, i was thinking of more permanent connections, like Samba/Windows shares, since that was mentioned in the original question... For less often transfers, i use scp, part of ssh package... why use rsync over ssh?

Richard

Medievalist 09-08-2003 11:12 AM

I use rsync in my backup scheme to synchronize the contents of over 20,000 directories; including the home directories and email spools of 400+ users and ten departments.

It takes less than an hour.

Fast enough? The tarballs take nearly 14 hours to make after the rsyncs are done.

Scp is SSH version 1. It's a replacement for the dreaded Berkeley rcp.

SFTP uses SSH version 2 and also comes with your SSH package. It's a replacement for FTP.

Rsync is designed to use the equally dreaded and fundamentally evil Berkeley rsh, but it can use ssh instead.

If you are already supporting samba, and haven't any need for speed or security, use smbclient. If you don't mind having another protocol engine to support, use NFS or Coda. If you want raw speed and power with hard-core security, use SFTP or rsync-over-ssh.

rkwellstead 09-09-2003 10:04 AM

Hehe... I never heard of sftp before - thanks for telling me... It rocks... well, compared to scp.

Richard

Medievalist 09-09-2003 10:37 AM

If you want to help support forther development, buy a T-shirt from http://openssh.org/


All times are GMT -5. The time now is 02:15 PM.