File transfer with SSH

Generate a public/private key pair by following Generating Key Pair and Registering Public Key, and register the public key via the User Portal.

We provide instructions for connecting using scp and sftp commands. On Windows, you can also connect using MobaXterm. MobaXterm allows file transfers via GUI.

The host names for each system are as follows.

System Name Host Name Note
File Transfer Server hpcfs.kudpc.kyoto-u.ac.jp recommended
Consists of two servers. Dedicated SFTP and RSYNC servers with no time limits.
System A camphor.kudpc.kyoto-u.ac.jp Consists of two login nodes.
System B/Cloud laurel.kudpc.kyoto-u.ac.jp Consists of three login nodes.
System C cinnamon.kudpc.kyoto-u.ac.jp Consists of three login nodes.
System G gardenia.kudpc.kyoto-u.ac.jp Consists of two login nodes.

$ scp [options] [source path] [destination path]

The remote machine is system B and the user ID is b59999.

  • Transfer file1.txt on the local machine to the home directory of the remote machine.
    $ scp file1.txt b59999@laurel.kudpc.kyoto-u.ac.jp:
    Enter passphrase for key 'id_rsa':
  • Transfer file1.txt of the remote machine to the local machine as file2.txt.
    $ scp b59999@laurel.kudpc.kyoto-u.ac.jp:file1.txt file2.txt
    Enter passphrase for key 'id_rsa':
  • Transfer the directory dir1 of the local machine to the remote machine.
    $ scp -r dir1 b59999@laurel.kudpc.kyoto-u.ac.jp:
    Enter passphrase for key 'id_rsa':
  • Transfer file1.txt of the local machine to the remote machine after specifying the private key.
    $ scp -i id_rsa file1.txt b59999@laurel.kudpc.kyoto-u.ac.jp:
    Enter passphrase for key 'id_rsa':

$ sftp [Option] [Connection Destination]

The remote machine is system B and the user ID is b59999.

$ sftp b59999@laurel.kudpc.kyoto-u.ac.jp
Enter passphrase for key 'id_rsa':
Connected to laurel.kudpc.kyoto-u.ac.jp.
sftp> put file1.txt
Uploading file1.txt to /home/b/b59999/file1.txt
file1.txt                                                                             100%   31     9.8KB/s   00:00
sftp> ls
file1.txt
sftp> get file2.txt
Fetching /home/b/b59999/file2.txt to file2.txt
/home/b/b59999/file2.txt                                                           100%   31     4.2KB/s   00:00
sftp> quit