
원격 서버에서 파일을 얻으려고 할 때 다음 중 하나를 수행할 수 있습니다.
1) Login to the remote server.
$ ssh root@remoteserverip
password:
$ scp theFileIwant myname@myserverip:/home/
2) Without logging to remote server
$ scp root@remoteserverip:/root/theFileIwant /home/
일반적으로 두 가지 방법 모두 모든 인트라넷 시스템에 적합합니다.
그러나 원격 서버가 다른 네트워크인 경우에는 방법 2만 작동합니다. 방법 1은 항상 시간 초과됩니다.
누구든지 (분명히 가능한) 대답을 지적할 수 있습니까?
답변1
댓글 작성자가 언급했듯이 myserverip에 다시 연결할 수 없는 데에는 여러 가지 이유가 있을 수 있습니다. 이 경우 ssh의 전달 기능을 사용할 수 있습니다.
(myserverip)$ ssh -R 2002:localhost:22 root@remoteserverip
password:
(remoteserver)$ scp -P 2002 theFileIwant myname@localhost:/home/