Connect as an SFTP user | Thorn Technologies

Connect as an SFTP user

When connecting using an SFTP client, it's recommended to use key-based authentication with SFTP Gateway. This is more secure than regular password.

Note: If you need to use password-based authentication, refer to this page on how to set that up.

Create a private key

In the process of creating a new user, the user's SSH key is sent via email. Paste the contents of this email (include the lines containing BEGIN and END) into a new file (e.g. call it userPrivateKey.pem)

SFTP via command line (Linux/Mac)

In order to use your private key at the command line, you need to tighten permissions. Run the following command:

chmod 600 userPrivateKey.pem

Log into the SFTP Gateway server as the new user:

sftp -i userPrivateKey.pem <user>@<public ip>

Once connected, you should be able to run SFTP commands:

  • ls
  • lls
  • cd
  • put
  • exit

SFTP using FileZilla

To log into the SFTP Gateway server using Filezilla, follow the GIF below.

  • Enter the username
  • Enter the instance's public IP
  • Select key file for the logon type
  • Choose the userPrivateKey.pem file you created earlier

filezillaGIF.gif

SFTP using WinSCP (Windows)

Fill in the following fields:

  • File protocol: Select SFTP
  • Host name: Use the instance's public IP
  • User name: Enter in the client username
  • Password: Leave this blank. Instead, you will configure the key below.

winSCP50.png

  • Click Advanced...
  • Click Authentication.
  • For the Private key file, select the userPrivateKey.pem you created earlier.
  • A dialog will appear asking if you want to convert the .PEM file to a .PPK file. Click Ok.
  • Click Save.
  • Select the newly converted key and click Ok.

WinSCPauth50.png

NoteTransfer resume must be disabled to properly transfer files when using WinSCP.

  • Click Preferences
  • Open the Endurance section
  • Find the section at the top where it says: Enable transfer resume/transfer to temporary filename for.
  • Click Disable
  • Click OK

pref_resume.png

Finally, you can connect to the SFTP Gateway server.

Updated 2017-11-10