The File Manager API provides SFTP-backed file operations on remote hosts. Every file operation requires an active SSH session created withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Termix-SSH/Termix/llms.txt
Use this file to discover all available pages before exploring further.
POST /ssh/file_manager/ssh/connect. Sessions time out after 30 minutes of inactivity and are cleaned up automatically.
All endpoints require JWT authentication via a jwt cookie or Authorization: Bearer <token> header.
Session management
Connect SSH session
POST /ssh/file_manager/ssh/connect
Establishes an SSH/SFTP connection for file manager operations. Supports password, SSH key, OPKSSH, and keyboard-interactive authentication, as well as jump host chains and SOCKS5 proxies.
Client-generated unique session identifier.
SSH server IP or hostname.
SSH server port.
SSH username.
Host ID from the Termix database. If provided without
password/sshKey, credentials are resolved server-side.SSH password for password authentication.
PEM-encoded SSH private key for key-based authentication.
Passphrase for the private key.
Authentication method:
password, key, opkssh, or none (keyboard-interactive).Legacy credential ID to resolve from the database.
Ordered list of jump hosts. Each object must have a
hostId property.Route the connection through a SOCKS5 proxy.
SOCKS5 proxy hostname.
SOCKS5 proxy port.
SOCKS5 proxy username.
SOCKS5 proxy password.
Ordered chain of SOCKS5 proxy nodes.
"success" on immediate connection, or "auth_required" if keyboard-interactive auth is needed but no credentials are configured.Human-readable status message.
Structured connection log entries.
Present and
true when TOTP is needed.Present and
true when Warpgate browser auth is needed.Echoed session ID, present with TOTP/Warpgate flows.
TOTP or keyboard-interactive prompt text.
Warpgate authentication URL.
Warpgate security key.
Error responses
Error responses
| Status | Meaning |
|---|---|
| 400 | Missing required parameters, or invalid SSH key format. |
| 401 | Authentication required, or OPKSSH token missing. |
| 500 | SSH connection failed. |
Example request
Example request
cURL
Verify TOTP
POST /ssh/file_manager/ssh/connect-totp
Completes a pending file manager connection by verifying a TOTP code. Call this when the connect response includes requires_totp: true. The session must be verified within 3 minutes.
Session ID from the connect call.
One-time code.
Error responses
Error responses
| Status | Meaning |
|---|---|
| 400 | sessionId or totpCode missing. |
| 401 | Authentication required or TOTP code invalid. |
| 404 | TOTP session expired — reconnect. |
| 408 | TOTP session or verification timed out. |
Complete Warpgate authentication
POST /ssh/file_manager/ssh/connect-warpgate
Signals completion of Warpgate browser authentication. The Warpgate session expires after 5 minutes.
Session ID from the connect call.
Disconnect SSH session
POST /ssh/file_manager/ssh/disconnect
Terminates the SSH session and releases all SFTP resources.
Session ID to close.
Check session status
GET /ssh/file_manager/ssh/status
Session ID to check.
Always
"success".Whether the session is currently connected.
Keep session alive
POST /ssh/file_manager/ssh/keepalive
Resets the session idle timer and probes the underlying SFTP channel.
Session ID.
Always
"success".Session state.
Updated last-active timestamp (milliseconds).
Set sudo password
POST /ssh/file_manager/sudo-password
Stores a sudo password temporarily in the session memory for use with privileged file operations.
Session ID.
Sudo password.
File operations
List directory
GET /ssh/file_manager/ssh/listFiles
Lists files and directories at the given remote path using SFTP with fallback to ls -la.
Session ID.
URL-encoded absolute path to list (e.g.
/home/ubuntu).Array of file/directory entries.
The path that was listed.
Error responses
Error responses
| Status | Meaning |
|---|---|
| 400 | Session ID missing or session not connected. |
| 403 | Session belongs to a different user. |
| 409 | A list request for the same path is already in progress. |
| 500 | SFTP or fallback command error. |
Example request
Example request
cURL
Identify symlink
GET /ssh/file_manager/ssh/identifySymlink
Resolves the target and type of a symbolic link.
Session ID.
URL-encoded path to the symlink.
Resolve path
GET /ssh/file_manager/ssh/resolvePath
Resolves a potentially relative or symbolic path to its canonical absolute path.
Session ID.
URL-encoded path to resolve.
Read file
GET /ssh/file_manager/ssh/readFile
Reads the content of a remote file. Binary files are returned as base64-encoded strings; text files are returned as UTF-8.
Session ID.
URL-encoded path to the file.
File content as a UTF-8 string or base64-encoded string.
Whether the file was detected as binary.
"utf8" or "base64".Detected MIME type.
File size in bytes.
Write file
POST /ssh/file_manager/ssh/writeFile
Creates or overwrites a file on the remote host.
Session ID.
Absolute remote path to write.
File content as a UTF-8 string.
Write via sudo if the file requires elevated privileges. Requires a sudo password to be set.
Upload file
POST /ssh/file_manager/ssh/uploadFile
Uploads a binary file to the remote host. Send the file as an application/octet-stream body, with metadata in query parameters.
Session ID.
URL-encoded remote destination path.
Upload via sudo.
Content-Type: application/octet-stream). File size limit is 5 GB.
Download file
POST /ssh/file_manager/ssh/downloadFile
Streams a file from the remote host to the client as a binary response.
Session ID.
Absolute remote path of the file to download.
Content-Disposition: attachment headers.
Create file
POST /ssh/file_manager/ssh/createFile
Creates an empty file at the specified remote path.
Session ID.
Absolute remote path for the new file.
Create via sudo.
Create folder
POST /ssh/file_manager/ssh/createFolder
Creates a directory (and any necessary parent directories) at the specified remote path.
Session ID.
Absolute remote path for the new directory.
Create via sudo.
Delete item
DELETE /ssh/file_manager/ssh/deleteItem
Deletes a file or directory. Directories are removed recursively.
Session ID.
Absolute remote path to delete.
Delete via sudo.
Rename item
PUT /ssh/file_manager/ssh/renameItem
Renames or moves a file or directory to a new path on the same host.
Session ID.
Current absolute remote path.
New absolute remote path.
Rename via sudo.
Move item
PUT /ssh/file_manager/ssh/moveItem
Moves a file or directory to a different directory. Equivalent to mv on the remote host.
Session ID.
Absolute remote path of the item to move.
Absolute remote path of the destination directory.
Move via sudo.
Copy item
POST /ssh/file_manager/ssh/copyItem
Copies a file or directory to a new location on the remote host.
Session ID.
Source absolute path.
Destination absolute path.
Copy via sudo.
Execute file
POST /ssh/file_manager/ssh/executeFile
Executes a file on the remote host as a script or binary and returns the output.
Session ID.
Absolute path of the file to execute.
Optional command-line arguments to pass.
Execute via sudo.
Change permissions
POST /ssh/file_manager/ssh/changePermissions
Changes the permissions (and optionally ownership) of a remote file or directory.
Session ID.
Absolute remote path.
Octal permission string (e.g.
"755") or symbolic permissions (e.g. "+x").Apply permissions recursively to directories.
Change permissions via sudo.
Extract archive
POST /ssh/file_manager/ssh/extractArchive
Extracts a compressed archive on the remote host. Supported formats: .tar, .tar.gz, .tgz, .tar.bz2, .tar.xz, .zip.
Session ID.
Absolute path to the archive file.
Directory to extract into.
Extract via sudo.
Compress files
POST /ssh/file_manager/ssh/compressFiles
Compresses one or more files or directories into a new archive on the remote host.
Session ID.
Array of absolute remote paths to compress.
Absolute path for the output archive file (including filename and extension).
Compress via sudo.