1

I am curious as to if there is a way for me to easily transfer large amounts of data between two Ubuntu machines, preferably via ethernet... I have done some research on these forums and most of the responses do not seem to apply to the most recent version of Ubuntu. Any help would be great, I just want to avoid having to transfer large amounts of data via wireless methods.

Thanks

  • 6
    You don't really need a crossover cable for this to work anymore, but you DO need to static-IP both computers when connecting them together directly. When you connect one computer to another directly without any type of Networking infrastructure between them, you have to set both sides to static IP addresses within the same subnet and then rsync/scp/sftp etc. between the systems (assumimg both are Ubuntu...) – Thomas Ward May 12 '19 at 16:01
  • @ThomasWard, your comment looks as if it could be an answer (Just my opinion though). – ThunderBird May 12 '19 at 16:44
  • 1
    @YufenyuyVeyehDider yeah but its really just a half answer because I don't say how to set the IPs, etc. ALso travelling so access to INet is spotty right now – Thomas Ward May 12 '19 at 16:50
  • 1

1 Answers1

2

I do have a crossover cable but sure, a normal UTP cable will serve as well. Ubuntu will automatically adapt to the UTP cable you use.
I had your exact same question and found the the following solution after looking up for "Link-Local Only" on this forum.
You have 2 computers and you want to link them in the most easy way. I use Ubuntu 20.4 on both.
Put your cable in the network slots of both computers.
Go to the settings panel (click somewhere in the upper right corner and click 'Settings') on one of your computers.
Click in the settings panel on Network.
In the box 'Wired' you see "Connected - 100 Mb/s" and the switch is to the right. If not, take the cable out and connect him afterwards.
Click on the cogwheel icon in this box.
This opens a window "Wired", click the tab IPv4
Now you see several IPv4 Methods. Choose "Link-Local Only". The DNS and Routes switches turn automatically on. Click Apply.
Open the window again and open the Details tab in this "Wired" window. Take notice of the IPv4 Address that shows up.
Now do the same at your other computer. Notice that this IPv4 address is not exactly the same.
Put your cable if it is not put already.
Both computers are now connected, if not something may be wrong with your cable. To confirm the connection open a terminal window and use the command "ping" followed by the IPv4 address of the other computer.

    Jan@mycomputername:~$ ping 169.254.112.194
    PING 169.254.112.194 (169.254.112.194) 56(84) bytes of data.
    64 bytes from 169.254.112.194: icmp_seq=1 ttl=64 time=0.219 ms
    64 bytes from 169.254.112.194: icmp_seq=2 ttl=64 time=0.319 ms
    64 bytes from 169.254.112.194: icmp_seq=3 ttl=64 time=0.450 ms

Type Ctrl+C to see the final result:

    ^C
     --- 169.254.112.194 ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 8194ms
    rtt min/avg/max/mdev = 0.219/0.368/0.456/0.084 ms

If you see 100% packet loss, something is not working. Reset the two computers and try a different order of connecting.

Now, to actually see the content of the other computer you need to install a server pogram at one of them. The best option is OpenSSH-server that you can install with this command in your terminal window:

    sudo apt-get install openssh-server

If that does not end with an error message, the openSSH server is up and running.

On your other computer go now to your files manager (formerly known as Nautilus) and open "Other Locations". There you see the option "Connect to Server". Enter as server address ssh:// followed by the name of the other computer (that is the name that appears after the @ in the terminal prompt) or the IPv4 address of the other computer. Click the Connect button. You will have to login with name and password of the other computer.
Now this computer is the socalled client computer and the other (where the OpenSSH-server is running) is your server. In the file manager of the client you will see your server computer and using this file manager you can move/transfer, copy and delete files in both computers.