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.
PS C:\Users\user> cd "C:\Program Files\PuTTY"
When psftp is already in PATH, the directory change is unnecessary.
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.
psftp> cd uploads Remote directory is now /home/user/uploads
psftp> ls incoming report.csv server.log
Run help at the psftp> prompt for a full list of supported commands.
psftp> lpwd Current local directory is C:\Users\user
psftp> lcd "C:\Users\user\Downloads" Local directory is now C:\Users\user\Downloads
Quotes are required for local paths containing spaces.
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.
psftp> ls report.csv report.csv
psftp> get server.log remote: server.log => local: server.log
Use mget *.log to download multiple files matching a pattern.
psftp> exit Disconnected.
PS C:\Users\user\Downloads> Get-ChildItem -Name server.log server.log