Close-up of blue-lit server hardware in a secure data center — SFTP's encrypted-channel home.

Setup guide

File Transfer

How to Connect SFTP to Univaultport (Password or PEM Key)

Connect any SSH-File-Transfer-Protocol server. Covers password auth, PEM private-key auth, and the production-grade key-only setup.

Univaultport TeamMay 21, 20265 min readEasy · 6 min

SFTP (SSH File Transfer Protocol) is the encrypted, modern replacement for FTP. It rides on top of an SSH connection — same protocol that powers remote shell access — so credentials, file metadata, and file bytes are all encrypted end-to-end.

Univaultport supports both authentication modes:

  • Password — easy to set up, lower security. Many production hosts disable it entirely.
  • PEM private key — production standard. The corresponding public key lives in the server's ~/.ssh/authorized_keys.

Step 1 — Collect server details

You'll need:

SettingExampleNotes
Hostsftp.example.com or 203.0.113.10No protocol prefix.
Port22Default SSH port. Some hosts use a non-standard port for security.
UsernamemigratorThe SSH/SFTP user on the server.
AuthPassword OR private keyAt least one required. Don't supply both — only one will be used.
Root path/var/uploadsOptional. Scopes the connector to a sub-folder.

Step 2 (Path A) — Password authentication

The simplest path. Just paste the password.

Host:        sftp.example.com
Port:        22
Username:    migrator
Password:    your-account-password
Private Key: (leave blank)
Root Path:   /var/uploads

Pros: quick setup. Cons: many production hosts disable password auth in /etc/ssh/sshd_config (PasswordAuthentication no). If the server is locked down, you'll see All configured authentication methods failed — switch to key auth (Path B).

Step 2 (Path B) — Private key authentication

The production-grade option. Two pieces:

  1. Private key lives in Univaultport (encrypted at rest).
  2. Public key lives on the SFTP server, in the target user's ~/.ssh/authorized_keys.

Generate a key pair

On any machine with OpenSSH installed:

ssh-keygen -m PEM -t rsa -b 4096 -f ~/.ssh/asset-migrator -N "" -C "asset-migrator"

This produces two files:

  • ~/.ssh/asset-migratorprivate key (paste into Univaultport)
  • ~/.ssh/asset-migrator.pubpublic key (copy onto the server)

Install the public key on the server

SSH into the server as the target user (one time, however you currently access it), then:

mkdir -p ~/.ssh
chmod 700 ~/.ssh
cat >> ~/.ssh/authorized_keys <<'EOF'
ssh-rsa AAAAB3Nz... asset-migrator
EOF
chmod 600 ~/.ssh/authorized_keys

Paste the contents of ~/.ssh/asset-migrator.pub (the public key file, with the ssh-rsa ... prefix) into the <<'EOF' block.

Paste the private key into Univaultport

Copy the entire contents of ~/.ssh/asset-migrator (the private key file) including the header and footer:

-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAyo...
...many lines...
-----END RSA PRIVATE KEY-----

Paste into the Private Key (PEM) field in the connector wizard. Leave the Password field blank.

Step 3 — Paste credentials into Univaultport

In the connector wizard:

  1. Host + Port

    From Step 1. Default port is 22.
  2. Username

    The SSH user name on the server.
  3. Password OR Private Key

    Fill exactly one. Private key is recommended for production.
  4. Root Path (optional)

    Scopes the connector to a subdirectory. Defaults to the user's home directory.

Click Save & test. Univaultport will:

  1. Open an SSH connection to host:port
  2. Authenticate with the credential you provided
  3. stat the rootPath to confirm it exists and is readable
  4. list rootPath to confirm we have directory read permission

If all four pass, the connector turns green.

Common errors

ErrorCauseFix
All configured authentication methods failedServer rejected password / keyVerify with ssh user@host first. If ssh works but Univaultport doesn't, check key format (must be PEM)
Permission denied mid-migrationUser can read but not write the destinationCheck ls -ld <destPath> on the server; grant w to the user
Connection refusedSSH daemon not running on this portnc -zv host 22 to confirm, or ask the admin for the right port
No such filerootPath doesn't exist for this userssh user@host pwd to see their home, then ls to find the right path
TimeoutFirewall blocking, or server's slow ssh_keyscanCheck security groups / firewall; raise tolerance on the server

Performance characteristics

SFTP supports multiplexed requests over a single connection — much faster than FTP at small-file workloads. However Univaultport currently serializes ops on the SFTP connection to avoid races with the underlying library's working state. We may add per-connection parallelism in a future release.

Typical throughput:

  • Small files (< 1 MB): 100-300 ms per file (latency-bound)
  • Large files (> 100 MB): network-bandwidth-bound, identical to scp

For very large migrations (10 GB+), SFTP is significantly faster than FTP because the SSH transport supports better congestion control.

Security best practices

  1. Use key auth, not passwordsPasswordAuthentication no in /etc/ssh/sshd_config on the server.
  2. One key per integration — generate a dedicated key for Univaultport rather than reusing personal SSH keys. Makes rotation and revocation trivial.
  3. Restrict the user — create a dedicated SFTP-only user with a chroot jail to the asset directory. Search "openssh sftp chroot" for the standard recipe.
  4. Audit authorized_keys — periodically. Univaultport's audit log records which user triggered which migration, but doesn't track server-side key presence.

Univaultport encrypts the PEM key AES-256 at rest and never returns it in API responses.

Next steps

With SFTP connected, common patterns are:

  • SFTP → S3 / GCS for migrating from a legacy server-hosted setup to a cloud bucket
  • Cloudinary → SFTP for delivering processed assets to a partner's secure server
  • SFTP → SFTP for moving between two SSH hosts during a server migration

Folder hierarchy is preserved on writes — SFTP supports real directories on both sides.

Keep going

Related guides