scp 是 secure copy 的縮寫,在windows
和linux
或Unix
系統之間互傳文件。
1.在windows下使用
先到win10應用商店安裝windows terminal。
PS C:\Users\Hanjun> scp.exe D:\let-demo\UE\module\rrc.cpp root@10.1.5.66:/root
The authenticity of host '10.1.5.66 (10.1.5.66)' can't be established.
ECDSA key fingerprint is SHA256:K9QA26xlCzZIFQ0lfWDLPLsMmq+XDMQZTfYMw4b9bAA.
Are you sure you want to continue connecting (yes/no)?
Warning: Permanently added '10.1.5.66' (ECDSA) to the list of known hosts.
root@10.1.5.66's password:
rrc.cpp 100% 955 467.7KB/s 00:00
PS C:\Users\Hanjun> scp root@10.1.5.66:/root/rrc.cpp e:/
root@10.1.5.66's password:
rrc.cpp 100% 955 467.2KB/s 00:00
2.在Linux下使用
scp administrator@192.168.3.181:/d:/test/test.dat /root
請注意:
因為windows
系統本身不支持ssh
協議,所以,要想在Linux上面用scp命令往windows傳送文件,必須在windows
客戶端安裝ssh for windows
的客戶端軟件,比如winsshd
,使windows
系統支持ssh
協議才行。