Linux/Ubuntu
[Linux] scp로 파일 주고 받기
안농이
2020. 3. 3. 12:52
secure copy의 줄임말로 ssh를 이용하여 로컬 -> 원격, 원격 -> 로컬로 파일 전송할 수 있는 프로그램이다.
Syntax
-C : Enable Compresion
-i : identity File or private key
-l : limit the bandwidth while copy
-P : pport number of target
-p : preserves permissions, modes and access time of files while copying
-q : suppress warning message of SSH
-r : copy files and directories recursively
-v : verbose output
Usage
scp [option] [source] [target]
Example
scp -P 2222 C\user\~~ [username]@[serverip]:/home/~~
디렉토리 까지 복사하고 싶을때
scp -r -P 2222 C:\user\source\directory [username]@[ipaddr]:/target/directory