(LINUX)Copy Files: Server from/to Remote

By default, it reads your ssh keys in local, if you want to mention specific key, syntax becomes:

syntax (remote to local):

scp -i /path/to/pem username@IP:/file/to/download /where/to/download

example:

scp -i sample.pem ubuntu@10.103.30.111:elasticsearch-2021-02-18-1.log.gz /home/username/

syntax(local to remote):

scp -i /path/to/pem  /file/to/upload username@IP:/where/to/upload

example:

scp -i shared/sharedna.pem ses-test.tar ubuntu@10.101.21.158:/home/ubuntu/




Previous
Previous

(LINUX) General User Create Script

Next
Next

Blocked out of ubuntu server : port 22