Shared server guidance · Question & answer

How do I use the interactive SFTP prompt?

SFTP has its own commands after the connection opens. Commands such as pwd and cd refer to the server, while lpwd and lcd refer to your local computer. Confirm both locations before transferring files.

BeginnerWindows 11 with Microsoft OpenSSH Client; Windows PowerShell 5.1 or PowerShell 7 as labelledLinux VPS and dedicated servers where a remote Linux command is shown
Go to the answer

Instructions

1. Open SFTP from Windows

Use the same authorised account, key and port settings as your working SSH connection.

Local Windows PowerShell
sftp adminuser@203.0.113.10

The prompt changes to sftp after host verification and authentication.

2. Check both working directories

Start with read-only navigation so that uploads and downloads land where intended.

SFTP prompt
pwd
lpwd
ls
lls

pwd and ls refer to the remote directory. lpwd and lls refer to the local Windows directory.

3. Transfer selected filenames

Choose names that do not overwrite files you need, then verify their presence.

SFTP prompt
put report.txt report-upload.txt
get server-report.txt downloaded-report.txt
bye

put uploads the local source; get downloads the remote source. These examples are independent and require their respective source files to exist. bye ends SFTP.

Check the result

  • Local and remote working directories were confirmed before transfer.
  • Each selected file appears at the intended destination with the expected size.

Troubleshooting

A normal shell command is rejected
You are at the SFTP prompt, which has its own command set. Use help there or exit to the appropriate shell.
A file cannot be found
Check whether the path is local or remote and use the matching cd or lcd command.

Official references

Use the documentation for your installed version when a flag, service name or platform feature differs.