BIG

scp [옵션] [유저명]@[호스트]:[원본 경로] [복사할 경로]


-p : 원본 파일의 변경 시간, 접근 시간, 퍼미션을 보존

-r : 하위의 디렉터리 및 파일까지 복사

-v : 상세 정보 출력

-F ssh_config : 설정파일 지정

-P port : 포트 지정
   ssh 프로토콜 포트가 22번이 아닌 경우 사용

 

 

case1. From Local Server To Remote Server ( UpLoad 개념 )

scp -r -P [PortNumber] [SourcePath] [Remote Server User]@[Remote Server IP address]:[TargetPath]


case2. From Remote Server To Local Server ( DownLoad 개념 )

scp -r -P [PortNumber] [Remote Server User]@[Remote Server IP address]:[SourcePath] [TargetPath]

 

case3. From Remote Server To Local Server ( DownLoad 개념 ) Authentication using pem key file

scp -r -i [Pem key File Path] [Remote Server User]@[Remote Server IP address]:[SourcePath] [TargetPath]

 

case4.sshpass 를 이용한 passwd 입력 방식

 

sshpass -p'[password]' scp [Remote Server User]@[Remote Server IP address]:[SourcePath] [TargetPath]

 

LIST