3

I have 2 laptops plugged into a ZTE ZXA10-F660 PON (like a 4 port ethernet router but with a fiber optic WAN connection). One laptop is running Linux Mint 19 Cinnamon (enp4s0) and the other is running Linux Mint 18.3 Cinnamon (eno1).


Mint 19

$ ifconfig enp4s0
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.11  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::c904:de40:7ade:60e1  prefixlen 64  scopeid 0x20<link>
        ether 44:8a:5b:6e:9e:5a  txqueuelen 1000  (Ethernet)
        RX packets 13631  bytes 12021145 (12.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10498  bytes 2776639 (2.7 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 19

Mint 18.3

$ ifconfig eno1
eno1     Link encap:Ethernet  HWaddr d4:be:d9:69:29:af  
         inet addr:192.168.1.31  Bcast:192.168.1.255  Mask:255.255.255.0
         inet6 addr: fe80::bdd7:8618:4d09:f574/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:2621 errors:0 dropped:0 overruns:0 frame:0
         TX packets:3617 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000 
         RX bytes:394623 (394.6 KB)  TX bytes:318527 (318.5 KB)
         Interrupt:20 Memory:f7e00000-f7e20000 

I've been using a portable external hard drive or a USB flash pen drive to transfer files between the two laptops for years because I find connecting two PCs via a LAN to be far beyond merely impossible.

I stumbled across LAN-Share (https://github.com/abdularis/LAN-Share) and fantasized that it would let me transfer files between the two laptops by going through my PON. Neither laptop can see the other on my LAN when both are running LAN-Share. There is a PON LED glowing for each ethernet connector plugged into a PON LAN port. Both laptops connect to the WWW with no problems and always have been able to do so, even when both were online at the same time.

A few magazine articles said LAN-share was really easy to use but the authors of the articles never met me. I installed samba on both laptops even though I don't know if I need it. I don't know what I do need. I don't know if what I want to do is even possible.

Is it possible to do what I want I to do?

6

If they are on the same network, or have a routed path between them, then there many ways that you can pass files back and forth directly.

Doing so securely is a different matter.

Easiest while keeping security in mind is to use SSH and its various utilities -

You can connect via scp or sftp by simply installing the openssh-server package on the remote machine.

scp ~/Documents/MyDocument.odt remoteuser@remotehost:~/Documents/

or

sftp remoteuser@remotehost
cd ~/Documents
lcd ~/Documents
mput MyDocument.odt

You can also install sshfs and mount the other machine's file system over ssh -

mkdir ~/remote-home 
sshfs remoteuser@remote.host:/home/remoteuser ~/remote-home

And then the contents of your ~/remote-home will be your home directory on the remote machine - you can open, save, copy, etc. as if it were part of your local file system. When you are done, simply use sudo to un-mount it -

sudo umount /home/localuser/remote-home

Can't use the ~/ reference in this case, since sudo will make it seem like it should be the root user's home directory, not your local user account.

You could even look into the possibility of using rsync over a ssh tunnel to keep entire directory structures synchronized between two machines set via cron to update every so often if that would fit your work flow better.

Quick, easy, Just Works, secure.

  • 3
    If you run sshfs under your normal user, you don't need sudo or root permissions in any way: use fusermount -u ~/remote-home (fusermount works for any FUSE filesystem mounted with user permission) – crater2150 Aug 5 '18 at 17:17
0

You might use the detour through "the cloud" to transfer files between the two. You could use transfer protocols like ftp or ssh (including sftp), (one of) which might already be installed on either node but might need some configuration. You could use networked shared / exported "disks" with samba or nfs, mount remotely and then use like a local disk.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.