SecureCopy(scp)의 약자로서 원격지에 있는 파일과 디렉터리를 보내거나 가져올 때 사용하는 파일 전송 프로토콜.
구문 : scp [옵션] [파일명] [원격지_id]@[원격지_ip]:[받는 위치]
Local ( 로컬 ) ----> Remote (원격지)
용례1 : scp -i ./awspwd.pem test.txt ubuntu@13.125.139.74:~/
local 애서 aws 에 만든 instance 에 file 을 전송할 경우의 예
-i ./awspwd.pem : aws 에 접속하기 위해 사용하는 pem 파일
test.txt : local 에 존재하는 file
ubuntu@13.125.139.74 : aws 의 id와 public IP address
:~/ : :이후에 이어서 복사하려는 target directory 경로를 붙인다. ~/ 은 home directory 의 root 를 의미함.
용례2 : scp -r -i ./awspwd.pem wget_test ubuntu@13.125.139.74:~/
aws instance 의 home root 에 local 의 wget_test directory를 copy 하는 명령어
Remote (원격지) ----> Local ( 로컬 )
scp -i ./awspwd.pem ubuntu@13.125.139.74:~/test.txt ~/ddd
remote 의 aws instance의 home directory 의 test.txt 를 local 의 home/ddd directory 로 copy 함.
scp -r -i ./awspwd.pem ubuntu@13.125.139.74:~/ddd ~/.
remote 의 aws instance의 home directory 의 ddd directory를 local 의 home/ directory 로 copy 함.
'Ubuntu > linux Command' 카테고리의 다른 글
Linux Command (User list 보기) (0) | 2021.09.09 |
---|---|
Linux Command (sftp) (0) | 2021.09.06 |
Linux command : SSH (0) | 2021.09.05 |
Linux Command (rsync) (0) | 2021.08.16 |
Linux System Command (awk) (0) | 2021.08.16 |