A 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 an identity file (.pem) then the command is a bit different.
We will have use ssh_option (-o) with the IdentityFile like below:
$ sftp -o IdentityFile=demo.pem firstname.lastname@example.org