Re: File Sharing Problem
Thomas H. George <lists@tomgeorge.info> wrote:
> I wish to share or move files between two Debian systems on a LAN. Each
> can successfully ping the other using their system names, dragon and
> phoenix.
There are myriad ways (well, quite a number, anyway) to do this. Here
are a few:
1. ssh
aptitude install ssh # On both boxes, please
...
scp -p /path/to/source otherhost:/path/to/target
scp -p otherhost:/path/to/source /path/to/target
2. rsync
aptitude install ssh rsync # On both boxes
...
rsync -avP /path/to/source otherhost:/path/to/target
rsync -avP otherhost:/path/to/source /path/to/target
3. NFS (actually the NFS automounter)
aptitude install autofs nfs-kernel-server # All of this on both boxes
...
echo '/var/autofs/net /etc/auto.net --timeout=60' >>/etc/auto.master
mkdir /var/autofs
invoke-rc.d autofs restart
echo '/data (rw,no_root_squash)' >>/etc/exports
invoke-rc.d nfs-common restart
invoke-rc.d nfs-kernel-server restart
If I've remembered everything correctly, you should now have each server's
/data mounted under /var/autofs/net/{machine_name}/data on the other.
Consequently, you should be able to do things like this from each box:
ls /var/autofs/net/phoenix/data/...
cp -p /var/autofs/net/dragon/data/some/file /target/path
4. Samba (SMB)
I'm going to leave this one alone, as I've never got it to work reliably
without fiddling around for hours. If you really decided to go this route
then maybe I'll try to give you my recipe. But you'll probably be better
off with #3, above. Or someone else's Samba configuration.
5. FUSE/ssh
A bit esoteric for this posting, I think.
> I have tried to copy the file I need with command on dragon:
> dragon:~# spc phoenix:/data/filename /data
> ssh: connection to host phoenix port 22: no route to host
That suggests you're not running ssh (service) on phoenix.
> Notes: I have edited hosts.allow on both systems to allow each other.
> There are no entries in hosts.deny. I have checked the output of
> netstat -pln and find that neither is listening on port 22 so I tried
If nothing's listening there's no point trying to talk to it.
aptitude install ssh
invoke-rc.d ssh restart
Chris
Reply to: