Skip to main content

SFTP Protocol

The SSH File Transfer Protocol (SFTP) is a secure network protocol used to transfer files over an encrypted SSH connection. It is widely adopted for business-to-business file exchanges due to its strong encryption, reliability, and support for automation. Unlike FTP or FTPS, SFTP runs within the Secure Shell (SSH) protocol and uses a single encrypted channel for both commands and data.

The SFTP process involves several key steps:

  1. Connection Initiation: The client initiates a TCP connection to the server.
  2. SSH Handshake: Both parties negotiate encryption, compression, and message integrity algorithms.
  3. Host Key Verification: The server presents its host key, which the client verifies against known keys.
  4. Authentication: The client authenticates using a password, public key, or both, depending on server configuration.
  5. SFTP Transfers: Once authenticated, the client begins file operations using the SFTP protocol.

UDMG SFTP Implementation

UDMG's role in SFTP communications is determined by the Endpoint types used in your Pipeline configuration.

UDMG can act as the SFTP Server or the SFTP Client. This flexibility allows UDMG to integrate with various partner scenarios: Your partner can exchange files with you using their SFTP client (UDMG as server), or you can exchange files with them using UDMG as the client (partner's external SFTP server).

UDMG as SFTP Server

This configuration involves a Local SFTP Server to Local Filesystem Pipeline.

Local SFTP Server to Local Filesystem Diagram

In this configuration:

  1. UDMG hosts and operates the SFTP Server Endpoint locally.
  2. External clients connect to UDMG's Local SFTP Server Endpoint.
  3. UDMG receives files from remote clients, or
  4. Client retrieves (pulls) files from UDMG.

UDMG as SFTP Client

This configuration scenario involves a Local Filesystem to Remote SFTP Server Pipeline, where UDMG sends files from the local filesystem to an external SFTP server.

Local Filesystem to Remote SFTP Server Pipeline Diagram

In this configuration scenario:

  1. UDMG's Remote SFTP Server Endpoint connects to an external SFTP server as a client.
  2. UDMG can push files to an external SFTP server.

Supported Versions

UDMG supports SFTP protocol version 3 in both:

Supported Host Keys

The Host Key of a Local SFTP Server Endpoint must be a Private Key, and the Host Key of a Remote SFTP Server Endpoint must be a Public Key. Any of the following key types are allowed:

  • RSA (Rivest-Shamir-Adleman)
  • DSA (Digital Signature Algorithm)
  • ECC (Elliptic Curve Cryptography)
info

The host private keys must be entered in one of the following formats:

  • PKCS#1 PEM-encoded Keys start with -----BEGIN RSA PRIVATE KEY-----
  • PKCS#8 PEM-encoded Keys start with -----BEGIN PRIVATE KEY-----
  • OpenSSH Keys start with -----BEGIN OPENSSH PRIVATE KEY-----
info

The host public keys must be entered in OpenSSH public key format RFC 4253.

Supported Algorithms

All of the following algorithms except diffie-hellman-group14-sha256 and curve25519-sha256@libssh.org are selected by default for SFTP Endpoints (Local SFTP Servers and Remote SFTP Servers).

TypeCiphers/ProtocolsRestrictions / Notes
Host Key
  • ecdsa-sha2-nistp256
  • ecdsa-sha2-nistp384
  • ecdsa-sha2-nistp521
  • rsa-sha2-512
  • rsa-sha2-256
  • ssh-rsa
  • ssh-dss
  • ssh-ed25519

DSA keys only accept 1024 bits, and the key must be in PEM PKCS1 format (between BEGIN DSA and END DSA lines)

-----BEGIN DSA PRIVATE KEY-----
...
-----END DSA PRIVATE KEY-----
Key Exchange (KEX)
  • ecdh-sha2-nistp521
  • ecdh-sha2-nistp384
  • ecdh-sha2-nistp256
  • curve25519-sha256
  • diffie-hellman-group16-sha512

Disabled by default:

  • diffie-hellman-group14-sha256
  • curve25519-sha256@libssh.org
  • ECDH key exchange is preferred, where available.
  • diffie-hellman-group16-sha512, while permitted, may be slow
Ciphers
  • aes-256-ctr
  • aes-192-ctr
Message Authentication Codes (MACs)
  • hmac-sha2-256-etm@openssh.com
  • hmac-sha2-512-etm@openssh.com
  • hmac-sha2-256
  • hmac-sha2-512
  • hmac-sha2-1