1. First connect to the instance using ssh command, make sure .pem (private key) is available in your ssh directory in ~/.ssh with permission chmod 400 <<my-key-pair.pem>>
> ssh -i my-key-pair.pem ec2-user@ec2-198-51-100-1.compute-1.amazonaws.com
2. After successfully connected, Execute the following command
> scp -ir my-key-pair.pem <<Source path>> ec2-user@ec2-198-51-100-1.compute-1.amazonaws.com:<<destination path>>
> ssh -i my-key-pair.pem ec2-user@ec2-198-51-100-1.compute-1.amazonaws.com
2. After successfully connected, Execute the following command
> scp -ir my-key-pair.pem <<Source path>> ec2-user@ec2-198-51-100-1.compute-1.amazonaws.com:<<destination path>>