Outils pour utilisateurs

Outils du site


issue113:tuto1

Ceci est une ancienne révision du document !


Table des matières

1

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.

Récemment, j'avais continuellement besoin d'utiliser sur mon ordinateur portable des fichiers qui se trouvaient dans mon vieux et fidèle ordinateur de bureau. L'ordinateur de bureau était sous Ubuntu 14.04 LTS et le portable, sous Linux Mint 17 Cinnamon. J'ai épluché le Net pour trouver des solutions.

Tous les gens sur les forums voulaient que j'obtienne Samba, qui peut créer un réseau avec Windows aussi bien qu'avec Linux. Ors, j'utilisais Samba dans les années 90 quand le serveur au bureau tournait sous Linux. Une fois le jeune que j'avais engagé l'a configuré, il ne s'est jamais planté ; le matériel est mort avec lui. Mais ce que je voulais faire ne valait pas Samba. Son heure viendra quand je connecterai mes ordis à l'ordinateur portable de ma copine, qui est sous Windows.

Tout ce que je veux, c'est pouvoir transférer occasionnellement des fichiers entre deux ordinateurs sous Linux connectés à un routeur Internet, une configuration domestique habituelle. C'est simple, mais ne fonctionne qu'entre deux machines sous Linux. Ce n'est pas très sécurisé et il ne s'agit pas de la création d'un réseau. Vous ne devrez pas le laisser fonctionner de façon continue : utilisez-le, puis fermez la connexion. Ce n'est pas fait pour l'édition à distance du chef d'œuvre de la littérature française.

2

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.

3

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.

5

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.1476001373.txt.gz · Dernière modification : 2016/10/09 10:22 de auntiee