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