메뉴 건너뛰기

리눅스 관련 모음

본문시작

조회 수 9146 추천 수 0 댓글 1
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

국산 통나무 수공예 남원제기, 남원목기

자료가 도움이 되셨다면
혼수용품제수용품 필요시
남원제기 공식 홈페이지 http://남원제기.kr
남원목기 공식 홈페이지 http://otchil.kr
에서 구매 해 주세요
정성껏 모시겠습니다.
 
Secure copy (scp) 사용법

local 서버에서 remote 서버에 파일을 올리고 받을 때는 주로 FTP를 사용하지만, 시스템을 설정하고 테스트하고 잦은 파일 교환 작업을 할 때는 GUI툴을 사용하지 않고 local에서 파일을 복사하듯이 사용해야 할 때가 있다. SSH를 통해서 scp 명령으로 안전하고 간단하게 파일을 복사할수 있다.

$ scp <옵션> <원본 경로 및 파일> <복사 받을 곳 경로 및 파일>


명령어

옵션
Remote 서버 경로
local 서버 경로

1. Remote 서버에 파일 올리기

$ scp -P22 /home/myhome/abc.tar oracle@123.456.78.9:/home/oracle/

              포트          로컬소스                    원격서버계정             원격 저장할 곳


abc.tar 파일을 123.456.78.9 서버의 22번 포트로 SSH 접속하여 oracle 사용자로 로그인 한 후 /home/oracle/ 아래에 복사한다.


2. Remote 서버에서 파일 받기

$ scp -P22 root@123.456.78.9:/usr/local/abc.xml /home/oracle/

             포트번호    원격서버계정        소스파일                 저장할 곳


3. Remote 서버에서 디렉토리 통째로 받기

                  -r 옵션은 하위 디렉토리 및 파일까지 복사한다.

$ scp -P22 -r root@123.456.78.9:/usr/local /backup/

            SSH포트    원격서버계정       소스DIR   로컬저장(디렉토리를 통째로 가져오기 때문에 local은 적지 않는다.)



remote 서버의 abc.xml 파일을 local의 /home/oracle로 다운로드 받는다.


SSH포트는 변경하는 경우가 많으므로 -P 옵션 사용했고, 서버 주소와 디렉토리의 구분은 콜론(:)을 사용한다. 원격지의 home 주소는 "./"를 사용해도 된다.
Ex) root@123.456.78.9:./


자주사용하는 옵션
-P : 포트번호 지정
-p : preserve의 약자로 원본 파일 시간의 수정시간, 사용시간, 권한을 유지한다.
-r : recursive의 약자로 하위 폴더/파일 모두 복사한다.

   

  1. php-559컴파일시 에러---configure: error: utf8_mime2text() has new signature,....

    Date2014.02.23 Category설치관련 By햇빛소년 Views3894
    Read More
  2. mysql 컴파일 설치 후 해야 할 일...

    Date2014.02.23 Category설치관련 By햇빛소년 Views4
    Read More
  3. libmysqlclient.so.16()(64bit) is needed by... 낮은 버전을 요구 할 때..

    Date2014.02.23 Category에러해결 By햇빛소년 Views4117
    Read More
  4. 리눅스 콘솔에서 SSH 원격 서버 접속하기

    Date2014.02.23 Category설치관련 By햇빛소년 Views3531
    Read More
  5. 원격 서버에 파일 올리거나 가져오기...

    Date2014.02.22 Category설치관련 By햇빛소년 Views9146
    Read More
  6. XE 데이터 이전시 "댓글" 사라지는 문제 해결...

    Date2014.02.13 Category에러해결 By햇빛소년 Views0
    Read More
  7. [mysql] 에러메세지 - [Note] Plugin 'FEDERATED' is disabled.

    Date2014.01.20 Category에러해결 By햇빛소년 Views6869
    Read More
  8. [mysql] 에러 메세지 - RSA private key file not found: /mysql/data//private_key.pem. Some authentication plugins will not work.

    Date2014.01.20 Category에러해결 By햇빛소년 Views1
    Read More
  9. [mysql]에러 메세지- #1146 - Table 'mysql.innodb_index_stats' doesn't exist 해결

    Date2014.01.17 Category에러해결 By햇빛소년 Views157
    Read More
  10. 만약 Phpmyadmin 메인 화면에서 다음과 같은 에러 메세지를 보이지 않게 하고 싶다면....

    Date2014.01.17 Category에러해결 By햇빛소년 Views5403
    Read More
  11. HTML <meta> Tag

    Date2013.12.26 Category에러해결 By햇빛소년 Views11307
    Read More
  12. error on line at column Input is not proper UTF-8, indicate encoding !

    Date2013.12.26 Category에러해결 By햇빛소년 Views4628
    Read More
  13. 'post-create' on '/var/spool/abrt/...................................

    Date2013.08.28 Category에러해결 By햇빛소년 Views0
    Read More
  14. What do these PHP mbstring settings do?

    Date2013.08.25 Category설치관련 By햇빛소년 Views11074
    Read More
  15. 메일계정 관련 명령어...

    Date2013.08.19 Category설치관련 By햇빛소년 Views0
    Read More
  16. procmail 소스설치

    Date2013.07.24 Category설치관련 By햇빛소년 Views14495
    Read More
  17. LGU+ 결제 Mserver 설치관련 에러 사항.....

    Date2013.07.18 Category에러해결 By햇빛소년 Views0
    Read More
  18. sendmail[8569]: auxpropfunc error invalid parameter supplied

    Date2013.07.11 Category에러해결 By햇빛소년 Views15686
    Read More
  19. The ClamAV Plugin --> clamav.cf , clamav.pm

    Date2013.07.07 Category설치관련 By햇빛소년 Views14881
    Read More
  20. clamav.cf --> Clamav Multiple Score

    Date2013.07.07 Category설치관련 By햇빛소년 Views18141
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 Next
/ 10