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 to use ssh_option (-o) with the IdentityFile like below:
$ sftp -o IdentityFile=demo.pem email@example.com