Wednesday, February 12, 2014

SSH/SCP to a remote machine / AWS from a terminal with a security key

Both 'ssh' and 'scp' Linux/Unix commands got '-i' option which accepts a path to the key file, so the commands look this way:

ssh -i /path/to/my/key/file.pem user@111.222.333.444

scp -i /path/to/my/key/file.pem ./src_file.gz user@111.222.333.444:/tmp/destintation_file.gz

No comments: