File transfer using sftp
¶
Learning outcomes
- Practice using the documentation of your favorite HPC cluster
- Can transfer files using
sftp
For teachers
Teaching goals are:
- Learners have practiced using the documentation of their favorite HPC cluster
- Learners have transferred files using
sftp
Lesson plan:
Prior questions:
- How can one do a file transfer from the terminal?
- Can you name some programs that can do file transfer from the terminal?
- Who has heard of
sftp
? - Who has already used
sftp
?
Introduction¶
SFTP is an abbreviation of 'SSH File Transfer Protocol' and 'SSH' is an abbreviation of 'Secure Shell protocol'.
Pros
- Secure
- Use cases:
- copying large or many files
- asks if you want to overwrite target files
- possible to resume file transfer after a broken connection.
- handle bulk file transfers
- modify directories
- and encrypt or decrypt specific files
When not to use
- Rsync is better for "syncing"
Procedure¶
Example Rackham¶
In the terminal, run sftp
to connect to Rackham by doing:
where [username]
is your UPPMAX username, for example:
If asked, give your center's password. You can get rid of this prompt if you have setup SSH keys
Upload/download files to/from Rackham
In sftp
, upload/download files to/from Rackham.
Basic sftp
command can be found here.
Cheat sheet¶
Basic sftp
command can be found here.