- 2 minutes to read
- Print
- DarkLight
- PDF
How to transfer a file in Terminal Proxy sessions using SFTP
- 2 minutes to read
- Print
- DarkLight
- PDF
In this document, you’ll find a step-by-step guide on how to perform file transfer using SFTP in remote Terminal Proxy sessions.
Some SSH tools, such as MobeXterm, automatically set an SFTP connection to transfer files after logging in with SSH. These SFTP connections won’t work, as the senhasegura proxy treats them separately.
Requirements
- Terminal Proxy type credential active.
- Start a connection via Multihop Terminal Proxy.
To transfer files directly to a destination server using SFTP, you must use the Multihop connection because binaries traveling under SFTP have no way to interact with the intermediate terminal.
Transfer via SFTP on the terminal
Due to limitations of the protocol the user can’t use a personal credential to perform the file transfer. Only with a credential registered in senhasegura will be possible to perform the transfer.
Also, it won’t be possible to record the session, but it’s still possible to enable logging with a report of transferred files. To learn how to enable this log, access the File transfer document.
To start, follow the steps and replace the strings with the values described in the table below.
String | Description |
---|---|
senhasegura_user | User of the senhasegura vault. |
senhasegura_vault | Hostname or IP address of the senhasegura vault. |
credential | Credential user you want to use for access. |
target_device | Hostname or IP address of the device you want to access. |
mfa_token | Code generated by MFA Token. |
file_name | Name of the file to be transferred. |
- Open the command prompt application of your preference.
- Type
sftp senhasegura_user[credential@target_device]@senhasegura_vault
AttentionIf the use of the OTP token is registered, it must be entered as the example:
sftp senhasegura_user[credential@target_device]token@senhasegura_vault
.
- Type
- Use the commands below to:
- Perform the file upload, type:
put [file_name]
- Press the Enter key to start.
- When the file is complete, a
<file_name> 100%
message will be displayed.
- Perform the file download, type:
get [file_name]
- Press the Enter key to start.
- When the file is complete, a
<file_name> 100%
message will be displayed.
- Perform the file upload, type:
- When finished, type:
exit
After completion, the files will be saved. When performing an upload it’ll be saved on the target machine and when downloading it’ll be saved on the user's machine. For the files to be saved within the senhasegura shell, it’s necessary to perform the sftp
without the use of Multihop.
Via WinSCP application
- Open the WinSCP application on your machine.
- On the Login screen fill in the fields in Session section.
- File protocol: select SFTP.
- Host name: type the hostname or IP address of the senhasegura vault.
- Port number: type 22.
- User name: type
sftp senhasegura_user[credential@target_device]@senhasegura_vault
- Password: enter your senhasegura access password
- Click Login.
After these steps, the connection will be ready for use, follow the tool's instructions to transfer the files.
If the user has an OTP token configured, use the token in the connection string. sftp senhasegura_user[credential@target_device]mfa_token@senhasegura_vault
.
The senhasegura Terminal Proxy also offers another type of file transfer via SCP, to find out how to perform this, access the How to transfer a file in Terminal Proxy sessions using SCP document.
Do you still have questions? Reach out to the senhasegura Community.