Accessing files via SFTP

  Last updated: 

  Unfortunately, the product documented here is currently only available in English.

To access the files via SFTP, you can use one of the methods explained below:

  After your account has been created, you will receive a welcome email in addition to a second email that contains the file password needed to access the files.
Web Client
  1. Log in to the web client via this URL: https://sftp.trustpayments.com/workspace
  2. Select "My Files" on the left.

  Do you need a login?

  Get started with SFTP Web Client


The "My Files" page lists files that are ready to be downloaded. You will be prompted to enter the file password after downloading the file in order to unzip and access the contents.

Screenshot of SFTP web client. "My Files" is selected on the left. A file called "test" is ready for download.

If you have lost the file password, you can request the email containing the password is resent by contacting your Account Manager.

  Files hosted on the SFTP server in "My Files" are available for 30 days, after which they will be deleted and will no longer be retrievable. If you need to retain access to these files, you will need to download them before the files are deleted.
SFTP Client

To access the files through an SFTP Client (e.g. WinSCP, FileZilla etc.), you will need to input the following details:

  • File Protocol - SFTP
  • Host Name - The URL that is provided to you in the welcome email
  • Port Number - 2222
  • Username - Same username as the web client
  • Password - Same password as the web client
  • Passcode (If 2FA is enabled) - One-Time Passcode (OTP) from Authenticator
Scripting

You can also opt to use scripting to access the files using programming languages like C#, Python, etc.

To access the SFTP through scripting, you will need to use external libraries that can handle these requests, such as OTP.Net and WinSCP for C#. An example of such an implementation would as follows:

using OtpNet;
using WinSCP;
var utf8 = new UTF8Encoding();
Totp totp = new Totp(Base32Encoding.ToBytes("<2FA-Secret-Key>"));
string passCode = totp.ComputeTotp(DateTime.UtcNow);
bool isValid = totp.VerifyTotp(passCode, out long timeStepMatched);
SessionOptions sessionOptions = new SessionOptions

{
Protocol = Protocol.Sftp,
HostName = "<Hostname>",
PortNumber = 2222,
UserName = "<Username>",
Password = <passCode>,
SshPrivateKeyPath = "<Path-To-SSH-Key>",
SshHostKeyFingerprint = "<SSH-HostKey-Fingerprint>",
};

 

Placeholders Description
<2FA-Secret-Key>

Obtained when setting up two-factor authentication (2FA) in the web client. If 2FA setup was already completed and the secret key was not stored, the 2FA will need to be disabled and re-enabled to obtain a new secret key.

<Hostname> The URL that is provided to you in the welcome email.
<Username> Your username, which can be retrieved from the welcome email sent upon account creation.
<passCode> The OTP generated by the external library.
<Path-To-SSH-Key>

Obtained by creating and downloading an SSH Key from the "Settings" section of the web client. You have the option to import an existing key or generate a new one through the web client.

Once the key is generated/imported on the web client, you have the option to download the key. This should be securely stored locally and <Path-To-SSH-Key> should be replaced by the local file path.

<SSH-HostKey-Fingerprint> The <SSH-HostKey-Fingerprint> ensures that the user can access the SFTP server via a secure SSH connection. It can be retrieved by using an SFTP Client (e.g. WinSCP) to connect to the server.
Was this article helpful?
0 out of 0 found this helpful