First Step - Connect to a remote computer
sftp -i ~/.ssh/LightsailDefaultKey-ap-south-1.pem ubuntu@52.66.180.155
Similar to ssh
command.
Output:
Connected to 52.66.180.155.
sftp>
Remote and Local computer commands
When we relay basic terminal commands at sftp>
like 'pwd
, ls
, cd
, and it is executed at the remote computer.
Basic terminal commands above when prefixed with l
like lpwd
, lls
, lcd
and etc. it is executed at a local computer.
For e.g.
List all files in the present working directory at the remote computer:
sftp> ls
List all files in the present working directory at the local computer:
sftp> lls
Sending a local computer file to present the working directory of a remote computer
sftp> put /Users/mj/Downloads/test.png
Output
Uploading /Users/mj/Downloads/test.png to /home/ubuntu/test.png
/Users/mj/Downloads/tech-mrit-prod.ovpn 100% 13KB 382.9KB/s 00:00
Comments
Post a Comment