운영체제 및 네트워크/리눅스

sever->client 파일보내기 및 가져오기

LeeJHstory 2017. 2. 20. 17:09
시작하기에 앞서 Cent_SVR에서 ssh접속이 제한되어 있어서 
# vi /etc/ssh/sshd_config 
49번의 설정을 #(주석)처리하였다.
# systemctl reload sshd.service 를 한다음
systemctl restart sshd.service 로 적용을 하였다.

Cent_Client 에서 Cent_SVR로 파일보내기

# cd Deskdop/

# touch scp_test   //scp_test 파일 생성
# echo hahaha > scp_test   // 내용입력
# scp -P 1876 /root/Desktop/scp_test root@192.168.13.129:/root/Desktop/
(Cent_SVR 서버로 scp_test파일을 넘겼다.)


상대방의 1876포트를 이용하여 /전송시킬 파일/ 전송경로

Cent_Client에서 Cent_SVR의 파일 받아오기
# scp -P 1876 root@192.168.13.129:/root/Desktop/scp_test /root/Desktop/
Cent_SVR에서 scp_test 파일을 수정한다음 다시 받아보아서 확인가능하였다.