JG Story

[2] 리눅스 서버간 파일전송 - scp 본문

IT/Linux

[2] 리눅스 서버간 파일전송 - scp

JG_lee 2021. 3. 19. 01:03

1. test.txt 파일전송

scp /tmp/test.txt root@192.168.0.10:/home/test

-> /tmp/test.txt 파일을 192.168.0.10 대상서버에 root 계정으로 접속하여 /home/test 경로 내 전송함.

    (root 접속시 비밀번호 입력필요)

      

2. test_dir 디렉토리 전송

scp -r /tmp/test_dir root@192.168.0.10:/home/test

->/tmp/test_dir 디렉토리를 192.168.0.10 대상서버에 root 계정으로 접속하여 /home/test 경로 내 전송함. 

 

3. 계정 비밀번호 인증없이 test.txt 파일전송

scp -o StrictHostKeyChecking=no /tmp/test.txt root@192.168.198.199:/home/test

-> /tmp/test.txt 파일을 192.168.0.10 대상서버에 root 계정으로 접속하여 /home/test 경로 내 전송함. 

    (root 계정 비밀번호입력없이 파일전송 진행)

 

Comments