Transfer files between trisquel_10 Thinkpad laptops with crossover ethernet cable

21 réponses [Dernière contribution]
amenex
Hors ligne
A rejoint: 01/03/2015

So far I have followed https://askubuntu.com/questions/22835/how-to-network-two-ubuntu-computers-using-ethernet-without-a-router/116680#116680 from which I used the commands sudo ip ad add 10.0.0.10/24 dev enp0s25 and sudo ip ad add 10.0.0.20/24 dev enp0s25 to set up IPv4 addresses on a T400 and a T420, respectively. I can ping each one from the other just fine, but when I use the command ifconfigI get enp0s25: flags=4163 mtu 1500
inet 169.254.27.126 netmask 255.255.0.0 broadcast 169.254.255.255
from the T400 and enp0s25: flags=4163 mtu 1500
inet 169.254.27.126 netmask 255.255.0.0 broadcast 169.254.255.255
from the T420, but the respective pings from one to the other IPv4 address gets "Destination host unreachable" each time.
Further progress with the ethernet connection edit procedure appears to be blocked by the system not liking a netmask of 255.255.255.0 for the 10.0.0.10 and 10.0.0.20 addresses. What is the gateway for those addresses ? is it the device name of the ethernet connection (enp0s25). Even if I get the ethernet connection up, what applications give me access to the other computer's desktop ?

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

Don't you have a router?

Even if I get the ethernet connection up, what applications give me access to the other computer's desktop ?

Trisquel 9 and 10 ship with Vinagre. Since it is now discontinued in favor of GNOME Connections, it is possible that Trisquel 11 will ship GNOME Connections instead. I do not know. There are other VNC clients.

On the other end, you need a VNC server. There are several too. Trisquel ships with Vino by default. However, here again, that project is now abandoned in favor of GNOME Remote Desktop, which is in Trisquel's repository.

amenex
Hors ligne
A rejoint: 01/03/2015

Yes, I do have a router, but the crossover ethernet cable ought to be more secure.
Trouble is, after I create the ethernet connection on the T420 with sudo ip ad add 10.0.0.10/24 dev enp0s25 what I see in the list of connections is enp0s25, analogously to my WiFi connection, but on
the T400, after the similar command sudo ip ad add 10.0.0.20/24 dev enp0s25 there is no network connection named enp0s25. And that unnamed ethernet connection won't stay up for very long.

Vinagre fails to detect the T420's name (george-Thinkpad-T420), address (10.0.0.20) or the named network connection (enp0s25). ping -c3 10.0.0.10 and ping -c3 10.0.0.20both work, but the second one fails if I don't re-up that connection frequently.

loldier
Hors ligne
A rejoint: 02/17/2016

"What applications give me access to the other computer's desktop?"

Caja knows how to handle file transfers. Just hit CTRL+L and ssh into the other machine. You'll get a graphical window just like any local folder on a computer within your LAN.

Something like 'ssh://user@remote_host' or 'ssh://user@192.168.1.101'

You should use a router or a switch.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

Caja knows how to handle file transfers. Just hit CTRL+L and ssh into the other machine.

You are right. I had forgotten about the title of the thread when I reached the question at the end of the original post, "what applications give me access to the other computer's desktop ?", that I interpreted as wanting to share the desktop.

The "other machine" must have an SSH server running. Installing the package "openssh-server" provides such a server.

amenex
Hors ligne
A rejoint: 01/03/2015

Magic Banana said The "other machine" must have an SSH server running.
Installing the package "openssh-server" provides such a server.

Some questions arise from that task:
(1) Please select the mail server configuration type that best meets your needs. I picked "No Configuration"
(2) General type of mail configuration: I picked "local only."
(3) The "mail name" is the domain name used to "qualify" _ALL_ mail addresses without a domain name.
This includes mail to and from : please do not make your machine send out mail from │ name at domain
unless name at domain has told you to. This name will also be used by other programs. It should be the single,
fully qualified domain name (FQDN). Thus, if a mail address on the local host is name at domain, the correct
value for this option would be example.org.
<=== but see what is suggested: System mail name: george-ThinkPad-T420
(4) setting myhostname: george-ThinkPad-T420.home
setting alias maps
setting alias database
mailname is not a fully qualified domain name. Not changing /etc/mailname.
setting destinations: $myhostname, george-ThinkPad-T420, localhost.localdomain, localhost
setting relayhost:
setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: loopback-only
setting default_transport: error
setting relay_transport: error
setting inet_protocols: all
/etc/aliases does not exist, creating it.
WARNING: /etc/aliases exists, but does not have a root alias
I guess "mailname" should be my primary domain name ?
(5) If you need to make changes, edit /etc/postfix/main.cf (and others) as needed.
To view Postfix configuration values, see postconf(1).
After modifying main.cf, be sure to run 'systemctl reload postfix'.
I'll see if my primary domain name seems appropriate here.
(6) Checking smb.conf with testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed
WARNING: The 'netbios name' is too long (max. 15 chars).
Leaves me the task of finding that name & fixing it ...
(7) Server role: ROLE_STANDALONE I hope so.
(8) Suggested additional packages I added all ~fifty of those that the system would accept.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

For some reason, it looks like you installed Postfix, an email server.

amenex
Hors ligne
A rejoint: 01/03/2015

Think of that as aerobic exercise. The men in my family have had long lives.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

I guess you are joking, but I do not get the joke.

amenex
Hors ligne
A rejoint: 01/03/2015

The point is: I'm patient at age 86 because my grandfather & father were both still healthy at that
stage of their lives. They both remained productive. There's still time for me to learn.

JC8
JC8
Hors ligne
A rejoint: 12/29/2020

Crossover Ethernet cables are something from mid 90s, most NICs from ~2004 and later should work and connect with each other just fine without need of crossover Ethernet cables thanks to something called Auto MDI-X, if a crossover cable is giving you trouble try using a straight cable instead. If it keeps giving issues, you may try setting the respective IPs of each NIC as default gateways of the other, and run a ping/nmap to see whether they return a response or not and to verify if the SSH port (default TCP 22) is opened, i'd also abstain from using a subnet mask with more than 254 available IPs as it's pointless when connecting only two machines and may require extra steps or cause furtherissues, set the subnet mask to 255.255.255.0.

As for the transferring method itself, i'd just mount the directory in question in one of the machines with SSH over FUSE (sshfs) and use regular copy through command line or your preferred file manager.

Geshmy
Hors ligne
A rejoint: 04/23/2015

https://en.wikipedia.org/wiki/Private_network

Typically network mask for a 10. network is 255.0.0.0 while the 192.168. network would typically be 255.255.255.0 and 172.16.0.0 would be 255.255.0.0.
10.*.*.* is a private address space for huge networks while 192.168.*.* is private for networks where 255 nodes will suffice.

But 10.*.*.* can be subdivided so I don't know if that's your problem.

'What is the gateway for those addresses ? '
Gateway for 10.0.0.10 would typically be 10.0.0.1 (but can be setup differently) and that would be assigned to the local router. I wonder what would happen if you made each laptop the other's gateway.

Or maybe consider disconnecting the router you have from the internet till you get the transferring done so you can use it as a reliable gateway.

re 'there is no network connection named enp0s25'
On my system: sudo ifconfig -a reveals my interface name as enp2s0. So I would go with
'sudo ip ad add 10.0.0.20/24 dev (whatever sudo ifconfig -a reveals on that machine)

amenex
Hors ligne
A rejoint: 01/03/2015

None of these concerns came up whan I used the tutorial referenced in the following
posting that I made before reading Geshmy's suggestions.
The main value of enp0s25 is that it appears as the name of the network connections
right after I activate them on the local and remote computers.

amenex
Hors ligne
A rejoint: 01/03/2015

Success ! Following the excellent tutorial that I found here:
https://phoenixnap.com/kb/ssh-to-connect-to-remote-server-linux-or-windows
where it's said: How to Use SSH to Connect to a Remote Server in Linux or Windows...
Aside: Don't pay attention to the last two words in the preceding sentence.
Everything (99%) of the syntax and steps work as written. The remaining 1% can be
intuitively worked out from an octogenarian's experience.

I can now log in to the remote machine with ssh george@10.0.0.20 and I can get the contents of a directory there with ls /media/george and I see the remote equivalent of my local /media/george folder.

Next, I'll set up to use Filezilla to make the file transfers; I have extensive experience
with that application because it was always 100% accurate.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

I'll set up to use Filezilla to make the file transfers

You can. Nevertheless, as loldier and JC8 told you, you can simply use your file manager.

amenex
Hors ligne
A rejoint: 01/03/2015

When I invoke the network connections withsudo ip ad add 10.0.0.10/24 dev enp0s25andsudo ip ad add 10.0.0.20/24 dev enp0s25
where does the network device enp0s25 reside ? I can see it in each ThinkPad's Network list,
but neither Caja nor Mate's file manager can find that network.

On the other hand, it took me only a minute or two to start FileZilla and connect to the remote machine,
select a file, and copy it to my local machine.

In the interest of learning to use the console, there are tasks that are more efficient with the console's
commands.

loldier
Hors ligne
A rejoint: 02/17/2016

Using Caja (Mate's File Manager) should be no different from FileZilla; the same user and ip address work in both of them.

Press CTRL+L and type in Caja's location bar (changing the line according to your own credentials):

'ssh://user@remote-host-ip-address_here'

The remote location on another machine should come up after typing in the proper password. I've included a screenshot with an ftp connection. SSH would look similar apart from the protocol and network (private/public) used.

You can try it easily. Paste this into your Terminal (it will launch Caja and ask for anonymous login into Academic Computer Club Umeå University Sweden):

caja ftp://ftp.acc.umu.se

#EDIT#

Another way to mount a computer's file folder over ssh is SSHFS. The syntax is something like this:

'sshfs user@remote_host:/home/user/directory ~/mountpoint'

For more details, see here:

https://www.redhat.com/sysadmin/sshfs

To use SSHFS on Trisquel, install package 'sshfs'. In the picture below, 'www' is a remote directory mounted locally at this mountpoint (www).

caja-ftp.png trisquel-11-sshfs.png trisquel-caja-sshfs.png
amenex
Hors ligne
A rejoint: 01/03/2015

After reading loldier's excellent & informative suggestions, I chose to install sshfs and
then tried george@george-ThinkPad-T400:/media/george$ sudo sshfs george@10.0.0.20:/media/george/Data-TP/ /media/george/TP-420/ -o slave where the -o slave option was intended to give me free access though the console and/or file manager, but the command stalled and when I stopped it with control-c the response was read: Interrupted system call.
I renamed the mount point so as not to confuse the mounted remote file system with the
local file systems. I invoked the -o slave option because the mounted remote system would
be unreadable otherwise.

Naturally, as that seems to be my way, I tried the Caja approach and found myself staring
at the complete file system of the remote ThinkPad. That is definitely the best:
Control -L, them ssh://george@10.0.0.20; then P/W one; then P/W two. Presto ! The Caja
file listing appears, just like Mate's file manager. No mounting of remote filesystems;
no hassles with permissions.

Thanks for everyone's patience.

amenex
Hors ligne
A rejoint: 01/03/2015

This was easy when both computers had an active network connection between 10.0.0.10
and 10.0.0.20, but I inadvertently disconnected the network and now every attempt to
reconnect with Control -L, then ssh://george@10.0.0.20 times out. It's as through the
system is waiting for passwords, but it's not asking for any. I've even set up the
local network with sudo ip ad add 10.0.0.20/24 dev enp0s25 and sudo ip ad add 10.0.0.10/24 dev enp0s25 The other computer still has an active connection to enp0s25.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

Try to log in the remote machine, executing in a terminal:
$ ssh george@10.0.0.20

amenex
Hors ligne
A rejoint: 01/03/2015

Magic Banana suggested:
Try to log in the remote machine, executing in a terminal:
ssh george@10.0.0.20

Today both machines have been restarted, and I tried to start the T420's
end of the network with
sudo ip ad add 10.0.0.20/24 dev enp0s25 which induced the T400 to start its enp0s25 network.
Then I executed the following two commands in the "remote" T420 with
sudo ip ad add 10.0.0.10/24 dev enp0s25 and
sudo ip ad add 10.0.0.20/24 dev enp0s25
but executingssh george@10.0.0.20 in the T400 is greeted with the response:
ssh: connect to host 10.0.0.20 port 22: Connection refused.
Conversely, executing
ssh george@10.0.0.10 in the T400 elicits:
ssh: connect to host 10.0.0.10 port 22: No route to host
At the other end of the network cable, ssh george@10.0.0.10 gets the response:
ssh: connect to host 10.0.0.10 port 22: timed out.
In other words, the T420 at 10.0.0.20 cannot get through to the T400 at 10.0.0.10
the opposite of what was the experience in my previous post.

amenex
Hors ligne
A rejoint: 01/03/2015

Previously, one network connection could be made, but not the other.
Yesterday, both ends of the Ethernet cable "connected" and FileZilla worked flawlessly.
Yesterday and today, both network connections made easily with:
T400 ==> sudo ip ad add 10.0.0.20/24 dev enp0s25 Then ssh george@10.0.0.20 ==> creates enp0s25
T400 ==> sudo ip ad add 10.0.0.20/24 dev enp0s25 Then ssh george@10.0.0.20 ==> creates enp0s25
Today: Cannot connect with any application, but enp0s25 is listed in Ethernet Networks
Yesterday: Connected with FileZilla, transferred ca. 400GB (750,000 transfers, zero errors).

Improvement is needed ==>
Select network from a list (enp0s25, like the WiFi connections).
Select application from a list (Caja, FileZilla, Remmina, Remote Desktop Viewer).
Provide credentials (username, password, local address).

Caja is the worst: Asks for password multiple times, popup has zero tolerance for any typing error, no reason for failed connection.