Secure file transfer over SFTP prevents passwords and file contents from crossing the network in clear text, and supports workflows where graphical clients are undesirable or unavailable. PSFTP, included with PuTTY on Windows 11, provides an interactive SFTP shell for uploading and downloading files from remote systems.

PSFTP connects to the server’s SFTP subsystem over an SSH transport, using either password authentication or public key authentication. The first connection to a host stores a server host key in the PuTTY cache, which is later used to detect unexpected server identity changes.

An SSH server with SFTP enabled must be reachable on the correct port (commonly 22), and network firewalls may block inbound access. Host key prompts and permission errors often indicate a wrong destination, a changed server key, or missing account rights, so verify fingerprints out-of-band before trusting a new key. Uploading to the wrong remote directory can overwrite files or expose data, so confirm both local and remote working directories before transferring.

Steps to transfer files with PSFTP from PuTTY:

  1. Open Windows Terminal or PowerShell.
  2. Change to the folder containing psftp.exe if the PuTTY directory is not in PATH.
    PS C:\Users\user> cd "C:\Program Files\PuTTY"

    When psftp is already in PATH, the directory change is unnecessary.

  3. Connect to the server using PSFTP.
    PS C:\Program Files\PuTTY> .\psftp.exe -P 22 user@example.com
    psftp: connecting to example.com:22
    The server's host key is not cached in the registry.
    The server's ssh-ed25519 key fingerprint is:
    ssh-ed25519 255 SHA256:3VgYv0o7lP7O2pQmJQ9uQmS3+2o9oQwS3y0XQ9m4dJc
    Store key in cache? (y/n) y
    user@example.com's password:
    Remote working directory is /home/user
    psftp>

    PSFTP supports common PuTTY options such as -P for port, -i for a .ppk private key, and -load to reuse a saved PuTTY session (proxy, username, key, and port).

    Storing an unverified host key can enable man-in-the-middle interception, so confirm the fingerprint with a trusted source before answering y.

  4. Change the remote working directory to the target folder.
    psftp> cd uploads
    Remote directory is now /home/user/uploads
  5. Confirm the remote directory contents.
    psftp> ls
    incoming
    report.csv
    server.log

    Run help at the psftp> prompt for a full list of supported commands.

  6. Confirm the local working directory used for transfers.
    psftp> lpwd
    Current local directory is C:\Users\user
  7. Change the local working directory to the folder holding the files.
    psftp> lcd "C:\Users\user\Downloads"
    Local directory is now C:\Users\user\Downloads

    Quotes are required for local paths containing spaces.

  8. Upload a local file to the remote directory.
    psftp> put report.csv
    local: report.csv => remote: report.csv

    Use mput *.csv to upload multiple files from the current local directory.

    Uploading to an existing filename overwrites the remote file on many servers.

  9. Verify the uploaded file exists on the remote side.
    psftp> ls report.csv
    report.csv
  10. Download a remote file to the local directory.
    psftp> get server.log
    remote: server.log => local: server.log

    Use mget *.log to download multiple files matching a pattern.

  11. Exit the PSFTP session.
    psftp> exit
    Disconnected.
  12. Verify the downloaded file exists in the local folder.
    PS C:\Users\user\Downloads> Get-ChildItem -Name server.log
    server.log