SFTP (SSH) Integration
SFTP (Secure File Transfer Protocol) runs over SSH, providing heavy encryption and security. It is the recommended standard for transferring files to Linux servers, VPS, and secure enterprise environments.
Prerequisites
- An SSH-enabled server (standard on almost all Linux machines)
- Port 22 (or your custom SSH port) open
- Either a Password or an SSH Private Key (.pem, .key, .ppk)
Setting up OpenSSH on Windows
Modern Windows 10/11 and Windows Server 2019+ come with OpenSSH built-in but it may need enabling.
Step 1: Install Server
- Open Settings > System > Optional Features.
- Click View features / Add a feature.
- Search for "OpenSSH Server" and install it.
Step 2: Start Service
Open PowerShell as Administrator and run:
Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'You can now connect to this Windows machine using your Windows username and password!
Authentication with SSH Keys
SSH Keys are safer than passwords. MigrateClouds supports private key authentication.
How to generate a key pair:
ssh-keygen -t rsa -b 4096This creates two files:
id_rsa(Private Key) - Upload this to MigrateCloudsid_rsa.pub(Public Key) - Add this to your server's~/.ssh/authorized_keysfile
Firewall & Cloud Configuration
Unlike FTP, SFTP is simple: it only needs ONE port.
AWS EC2 (Security Groups)
Inbound Rules:
| Type | Port Range | Source |
|---|---|---|
| SSH | 22 | 0.0.0.0/0 |
Azure VMs (NSG)
Inbound Port Rules:
| Protocol | Port | Action |
|---|---|---|
| TCP | 22 | Allow |
Troubleshooting
Permission Denied (publickey)
Ensure your Public Key is correctly copied to `~/.ssh/authorized_keys` on the server and that the permissions are correct (`chmod 600 ~/.ssh/authorized_keys` and `chmod 700 ~/.ssh`).
Connection Refused
Check if the SSH service is running (`sudo systemctl status ssh` on Linux or `Get-Service sshd` on Windows) and that Port 22 is open.