다른 리눅스로 ssh 접속하기
먼저 서버와 통신이 되는 지 확인
# ssh root@192.168.42.203 //연결할 서버 ip주소
# ifconfig | grep inet
inet addr:192.168.42.203 Bcast:192.168.42.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe72:17ea/64 Scope:Link
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
확인
# exit 종료
SCP(Secure Copy)
ssh를 통해 원격으로 파일을 복사하는 명령
client]
# echo scptest > /root/scptest
# cat /root/scptest
scptest
# scp /root/scptest root@192.168.42.203:/root/scptest
server]
넘어가서 파일 생겼는 지 확인
# ls –al /root/scptest
클라이언트 /root/install.log 파일을 => 서버 /tmp/put으로 복사
ssh 포트22000번일 때, ktest로 복사
# scp –P 22000 /root/install.log ktest@192.168.42.203:/tmp/put
원격 연결해서 확인
반대로 가져올 때
# scp –P 22000 ktest@192.168.42.203:/tmp/put /tmp/get
내 디렉터리에서 파일 확인
# ls –al /tmp/get
'운영체제' 카테고리의 다른 글
vmware에서 Router 만들어서 연결하기(윈도우-리눅스) (0) | 2021.06.28 |
---|---|
SSH xinetd (0) | 2021.06.25 |
SSH(Secure Shell) (0) | 2021.06.24 |
데몬과 xinetd 환경 설정, TCP Wrapper (0) | 2021.06.23 |
프로세스 관리와 스케쥴링 (0) | 2021.06.22 |