E-mail : support@tech2now.in

How to copy file using sftp command in RHEL9

Linux Linux command ls pwd cp mv more grep tail

use sftp command to upload the file and download the file

$ sftp john@example.com
Connected to example.com.

sftp> ls

file1.txt file2.txt directory/

sftp> cd directory

sftp> put localfile.txt
Uploading localfile.txt to /home/john/directory/localfile.txt
localfile.txt 100% 10KB 50.0KB/s 00:00

sftp> get remotefile.txt
Fetching /home/john/directory/remotefile.txt to remotefile.txt
/home/john/directory/remotefile.txt 100% 10KB 50.0KB/s 00:00
sftp> exit