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.
Instructions
1. Open SFTP from Windows
Use the same authorised account, key and port settings as your working SSH connection.
sftp adminuser@203.0.113.10The 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.
pwd
lpwd
ls
llspwd 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.
put report.txt report-upload.txt
get server-report.txt downloaded-report.txt
byeput 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.
