Sunday 1 March 2020

scp

Copy file of AWS -> to my machine


Ins-MacBook-Pro:keypair inheeoh$ scp -i matt_singapore_ec2_keypair.pem ubuntu@13.251.213.109:~/bin/go* ~/aws/XAMPP/
gobin                                                                                                   100%   21     0.2KB/s   00:00    
gohome                                                                                                  100%   18     0.2KB/s   00:00    
gohtml                                                                                                  100%   34     0.3KB/s   00:00    
goscript                                                                                                100%   21     0.2KB/s   00:00    
gowww                                                                                                   100%   34     0.3KB/s   00:00    
Ins-MacBook-Pro:keypair inheeoh$ scp -i matt_singapore_ec2_keypair.pem ubuntu@13.251.213.109:/opt/lampp/htdocs/index* ~/aws/XAMPP/
index.html                                                                                              100%  206     1.9KB/s   00:00    
index.php                                                                                               100%  261     2.4KB/s   00:00    
Ins-MacBook-Pro:keypair inheeoh$ 



Copy local files -> to AWS
$ scp file1 file2 user@host:/path/to/directory            # copying multiple files using scp command
$ scp -r /path/to/directory user@host:/path/to/directory  # Copying an entire directory with scp command
https://devhints.io/scp


Ins-MacBook-Pro:keypair inheeoh$ pwd
/Users/inheeoh/Dropbox/TechDoc/AWS Documentation/keypair
Ins-MacBook-Pro:keypair inheeoh$ scp -i matt_singapore_ec2_keypair.pem ~/aws/XAMPP/*.html  ubuntu@13.251.213.109:/opt/lampp/htdocs
index.html                                                                                                                                                              100% 2692    23.2KB/s   00:00    
index2.html                                                                                                                                                             100%  206     1.6KB/s   00:00    
Ins-MacBook-Pro:keypair inheeoh$ 

No comments:

Post a Comment