Outils pour utilisateurs

Outils du site


issue113:tuto1

Ceci est une ancienne révision du document !


Not long ago, I kept wanting files in my laptop that were in my trusty old desktop. My desktop computer was running Ubuntu 14.04 LTS, and my laptop Linux Mint 17 Cinnamon. I scoured the ’net for solutions.

Everybody in forums wanted me to get Samba, which can network with Windows as well as Linux; I used Samba in the 1990s, when my office server ran on Linux. Once the teenager I hired set it up, it never crashed; the hardware died before it did. But this was not Samba worthy. When I connect my ’puters to my girlfriend’s Windows laptop… that will be Samba time.

This is just to be able to transfer the odd files between two computers running Linux and connected to an Internet router, a typical home setup. It’s simple, but works only between Linux machines. It’s not the most secure, and is not a network setup, and should not be left up and running forever. Use it, then close the connection. This is not for editing the Great American Novel remotely.

The short and simple explanation is use Simple File Transfer Protocol, or SFTP. This is a file transfer protocol that is not secured; it allows UserID login (User-id/Password combination), displays hierarchical folders, and lets the SFTP user do basic file management (rename, delete, upload, download, download with overwrite, download with append). You need to have both computers on, know each computer’s local network IP address, check that the computers can “ping” each other (make contact) and that ssh is working on both, then it’s simple. On either PC, open the file manager and type on the location bar:

sftp:username@198.168.X.XXX (username at the IP of the other computer) You may be asked for the password of the user in the other computer. Have that handy. If you’re a little lost with my short and simple, here are more detailed, step-by-step instructions. First, before anything else, turn on both computers and boot them up. Second, get each computer’s IP address within the local network. The address identifies a computer within a network. Find it by opening the Terminal (Ctrl-Alt-T) and typing at the prompt: ifconfig You will get several sets of information, look for something that looks like this: inet addr:192.168.X.XXX The X’s stand for variable numbers; yours need not be the same as mine, but 192.168 is the standard for local networks. Do this in both machines, writing down the IP numbers. Third, make sure each computer “sees” the other. This means you “ping” each computer from the other. To ping, go to each computer, open the command line terminal and at the prompt type: ping 198.168.X.XXX (“ping” is the command; “198.168.X.XXX” is the other computer’s IP) You’ll get something like the output shown on the next page (top right). OK, so I pinged myself for this example report, but … note the ^C. That’s when I pressed Ctrl-C to stop the pinging. Then it gave a little report. Next, go do the same thing on your other Linux computer. If you get a similar response, then you’ve pinged both ways. Fourth, install the program openssh-server on both PCs. If you are using Ubuntu and related Linux distributions, open the Terminal and type: sudo apt-get install openssh-server Accept the defaults offered and don’t provide a pass-phrase on the last step. Then check that ssh is running on both PCs: open system-monitor and see if sshd is running in the processes tab. OK, now you’re ready to transfer. On either PC, but not both at the same time, open the file manager and type on the location bar: sftp:username@198.1.68.X.XXX (This means: open the Username, meaning the user on the other computer whose files you are trying to retrieve, at the computer located at the particular IP address)

You may be asked for the password of the user in the other computer. Have that handy.

You should be in and be able to copy and move files back and forth, using the dual pane functions (F3 in most Ubuntu and related file managers).

issue113/tuto1.1475485673.txt.gz · Dernière modification : 2016/10/03 11:07 de auntiee