This is a tutorial on how to use SFTP and how to interact with files both locally and on Hellgate. It will cover both uploading to Hellgate from a local machine and downloading to a local device from Hellgate.
Part 1: Uploading to Hellgate From a Local Machine
The first step is to connect via sftp using a netID. To exit use the exit command.
- sftp> exit
Then users will navigate to the desired file they wish to upload to Hellgate. Once in the shell users will have access to both the local machine and Hellgate. To look within the local machine use 'lls', the 'l' character will be used for any local commands, and to move around Hellgate the normal 'cd' works but for the local machine it would be 'lcd'. In the shell navigate to the directory with the desired file. In this tutorial it would be 'example_test.txt'.
To upload a file from the local machine make sure to be in the same directory. Once there use the 'put' command. If no path is specified the file will be uploaded to the home directory by default. If a needs to be specified, the full path to the desired directory will be put after the file name. In the example below no path is specified.
Then, while still in the shell navigate to the path displayed to make sure the file was successfully moved.
The file was then successfully uploaded to Hellgate. The original will still be available on the local machine as well.
Part 2: Downloading to a Local Machine From Hellgate
Same as uploading. the first step is to connect to the sftp shell.
This time the original file will be on Hellgate already so the normal commands can be used to navigate. Go to the directory with the desired file to download. This tutorial will be using a test file called 'example_test.txt'.
Make sure that on the local machine the current directory is where the file should be. If not navigate there within the shell. Use the 'get' command to download the file. A path can be specified for where to download the file. The example below specifies such a path. If no path is specified it will download to the default.
The original file will still be available on Hellgate.