scp command to aws instance code example
Example 1: secure copy to aws
scp -i /directory/to/abc.pem /your/local/file/to/copy [email protected]:path/to/file
Example 2: best way to ssh to ec2 instance through public cloud
# SSH over Session Manager
host i-* mi-*
ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"