How to do SFTP using pem file from command line?

Simple file transfer protocol ( SFTP ) is really essential in many cases. The regular SFTP is very straightforward. But when we want to do SFTP using a identity file (.pem) then the command is bit different.

We will have use ssh_option (-o) with the IdentityFile like below:

$ sftp -o IdentityFile=demo.pem ubuntu@ec2-52-25-231-230.eu-west-1.compute.amazonaws.com
Share