Ceci est une ancienne révision du document !


Translation in progress …

Copying files

Using scp

Fron ENS network

  • Copy from your computer to allo-psmn :
scp file1 yourlogin@allo-psmn:~/file2
 
scp path1/file1 yourlogin@allo-psmn:~/path2/file2

You'll need to enter your password except if you you are using an SSH agent.

  • Copy from allo-psmn to your computer
scp yourlogin@allo-psmn:~/file1 file2
 
scp yourlogin@allo-psmn:~/path1/file1 path2/file2

You'll need to enter your password except if you you are using an SSH agent.

From outside of ENS network

  • Copy (file1 → file2) from your computer to allo-psmn (via ssh.psmn):
scp -oProxyCommand="ssh yourlogin@ssh.psmn.ens-lyon.fr netcat -w1 allo-psmn %p" file1 yourlogin@allo-psmn:~/file2
 
scp -oProxyCommand="ssh yourlogin@ssh.psmn.ens-lyon.fr netcat -w1 allo-psmn %p" path1/file1 yourlogin@allo-psmn:~/path2/file2
  • Copy (file1 → file2) from allo-psmn to your computer (via ssh.psmn):
scp -oProxyCommand="ssh yourlogin@ssh.psmn.ens-lyon.fr netcat -w1 allo-psmn %p" yourlogin@allo-psmn:~/file1 file2
 
scp -oProxyCommand="ssh yourlogin@ssh.psmn.ens-lyon.fr netcat -w1 allo-psmn %p" yourlogin@allo-psmn:~/path1/file1 path2/file2

You can use simpler copy commands just by using a config file for SSH multihops. This file is also useful for your everyday connection to the PSMN and if you choose to use sshfs or rsync for transferring/copying files .

Using sftp

From outside of ENS network

First, you need to open a sftp session:

sftp yourlogin@allo-psmn

Output: Connecting to allo-psmn…

Then, enter your password

sftp> pwd

Remote working directory : /home/yourlogin

sftp>

Use the command put and get to transfer files within the sftp session.

From outside of ENS network

Fill in the command below:

sftp -oProxyCommand="ssh yourlogin@ssh.psmn.ens-lyon.fr allo-psmn" yourlogin@allo-psmn

Using rsync

From ENS network

  • Copy from your computer to /home/yourlogin/targetdir/ at PSMN :

You need a multi-hop SSH configuration (see ~/.ssh/config)

Exemple with the front node m6142comp1:

  • ~/.ssh/config
Host m6142comp1
  User <yourlogin>
  Hostname m6142comp1
  ProxyCommand ssh <yourlogin>@allo-psmn.psmn.ens-lyon.fr netcat -w1 %h %p
  • commande rsync
rsync -avz -4 --ignore-errors --delay-updates -e ssh ./sourcedir <yourlogin>@m6142comp1:~/targetdir/

The name of all available front nodes is listed here.

Check rsync's man for other useful options (dry-run, human-readable, progress …).

From outside of ENS network

  • Il faut compléter la définition des tunnels SSH :
# passerelle externe
Host allo-externe
  User <votrelogin>
  ProxyCommand ssh <votrelogin>@ssh.psmn.ens-lyon.fr -w1 allo-psmn %p
 
Host dl175comp-ext
  User <votrelogin>
  Hostname dl175comp
  ProxyCommand ssh <votrelogin>@allo-externe netcat -w1 %h %p
  • commande rsync

vers la frontale telle qu'elle est définie dans ls fichier de configuration : dl175comp-ext

rsync -avz -4 --ignore-errors --delay-updates -e ssh ./sourcedir <votrelogin>@dl175comp-ext:~/targetdir/

Avec sshfs

Vous devez utiliser une configuration multi-hop : fichier de configuration SSH multihop.

Exemple :

~/.ssh/config
 
Host *
  TCPKeepAlive yes
  ForwardAgent yes
  ForwardX11 yes
 
Host allo-psmn-multihop
  User ltaulell
  ProxyCommand ssh -qt ltaulell@ssh.psmn.ens-lyon.fr allo-psmn 22
# verbose (debug):
  #ProxyCommand ssh -v ltaulell@ssh.psmn.ens-lyon.fr allo-psmn 22
 
Host multihop-psmn
  User ltaulell
  Hostname x5570comp1
  ProxyCommand ssh -qt ltaulell@allo-psmn-multihop netcat -w1 %h %p
  • Je monte mon home PSMN :
ltaulell@xt3:~$ mkdir -p mnt/home-psmn
ltaulell@xt3:~$ sshfs multihop-psmn:/home/ltaulell /home/ltaulell/mnt/home-psmn/

Pour démonter : fusermount -u ~/mnt/home-psmn/

  • Je monte le partage d'équipe (ici, ondesint) :
ltaulell@xt3:~$ mkdir -p mnt/equipe-psmn
ltaulell@xt3:~$ sshfs multihop-psmn:/Xnfs/ondesint /home/ltaulell/mnt/equipe-psmn/

Pour démonter : fusermount -u ~/mnt/equipe-psmn/

From a Windows machine

From a Windows© machine, use the following combinaition of tools PuTTY / WinSCP.

en/documentation/tutorials/copie.1527089497.txt.gz · Dernière modification : 2020/08/25 15:58 (modification externe)