Docs · Clients

WinSCP SFTP settings and scripting

WinSCP is the most common SFTP client on Windows, and its scripting mode runs unattended transfers from Task Scheduler. Pinning the host key makes a script refuse any other server.

These steps use the SFTP Harbor endpoint data.sftpharbor.com and the example login yourserver.alice: your server's name, a dot, and the user name. Signed-in customers see the same steps with their own login on the dashboard's overview.

  1. In the Login dialog choose New Site, File protocol SFTP.
  2. Host name: data.sftpharbor.com Port number: 22 User name: yourserver.alice
  3. Leave the password empty to be asked each time.
  4. Login. WinSCP shows the server's key fingerprint: compare it with the one below before you choose Accept.
  5. For scripts, the -hostkey switch pins the key so an unexpected server is refused. Set HARBOR_PASSWORD in the environment first.

Expected host key fingerprint

ssh-ed25519 255 SHA256:…
upload.txt (run with winscp.com /ini=nul /script=upload.txt)
open sftp://yourserver.alice@data.sftpharbor.com:22/ -hostkey="ssh-ed25519 255 …===" -password=%HARBOR_PASSWORD%
put C:\outbox\report.csv /
exit

Host keys are also listed on the security page, with SSHFP records. When keys are rotated, the new ones are announced 30 days ahead and included above.