How to transfer files via Terminal Proxy

Prev Next

You can transfer files between your workstation and remote devices through the Segura® Terminal Proxy. This document guides you on how to perform these operations using the SFTP and SCP protocols.

Requirements

  • A file transfer client (SFTP or SCP) installed.
  • User access to the Segura® Platform.
Attention

Some tools automatically attempt to open an SFTP connection after SSH login. These automatic connections do not work, as Segura® Platform handles terminal and file transfer sessions separately.

Transfer via SFTP (Recommended)

The SFTP protocol is the recommended method, as it uses the Multi-hop connection to connect directly to the target device. For the SaaS environment, use port -P 4022.

Info

For direct transfers via SFTP, using the Multi-hop format is mandatory, as the protocol binaries do not interact with intermediate terminals.

SFTP connection formats

Standard connection with SaaS:

sftp -P 4022 segura_user%tenant_saas[credential@target_device{ssh.22}]@segura_instance

Connection with MFA (TOTP):

sftp -P 4022 segura_user%tenant_saas[credential@target_device{ssh.22}]mfa_token@segura_instance

Command parameters

Item Description
segura_user User name to access the Segura® Platform.
segura_instance Access URL of your provided Segura® environment.
tenant_saas Identifier name of your tenant (e.g.: corporation_tenant).
credential User of the credential that will be used on the target device.
target_device Hostname or IP address of the destination.
mfa_token Six-digit code of your MFA Token.

Transfer commands

After establishing the SFTP connection, use the following commands at the prompt:

  • For upload: Type put [file_name] and press Enter.
  • For download: Type get [file_name] and press Enter.
  • To exit: Type exit and press Enter.

Transfer via SCP

The SCP command allows file transfer in two steps, as it does not support the Multi-hop connection chain. For the SaaS environment, use port -P 4022.

Attention

The SCP syntax does not support Multi-hop connections. You must perform the process in two steps: upload the file to Segura® Platform and then send it to the destination. We recommend using SFTP for a more direct experience.

SCP connection formats

Perform upload (Workstation > Segura® Terminal Proxy):

scp -P 4022 file_name segura_user%tenant_saas[credential@target_device{ssh.22}]@segura_instance:destination_path

Perform download (Segura® Terminal Proxy > Workstation):

scp -P 4022 segura_user%tenant_saas[credential@target_device{ssh.22}]@segura_instance:file_path local_path

Command parameters

Item Description
file_name File you want to transfer.
file_path Location where the file is stored at the destination.
destination_path Location where the file will be saved at the destination.