pscp 可以將檔案複製到 Windows 的主機,功能類似 Linux 的 scp。
pscp 使用參數
# /usr/bin/pscp
PuTTY Secure Copy client
Unidentified build, Mar 14 2015 13:36:11
Usage: pscp [options] [user@]host:source target
pscp [options] source [source…] [user@]host:target
pscp [options] -ls [user@]host:filespec
Options:
-V print version information and exit
-pgpfp print PGP key fingerprints and exit
-p preserve file attributes
-q quiet, don’t show statistics
-r copy directories recursively
-v show verbose messages
-load sessname Load settings from saved session
-P port connect to specified port
-l user connect with specified username
-pw passw login with specified password
-1 -2 force use of particular SSH protocol version
-4 -6 force use of IPv4 or IPv6
-C enable compression
-i key private key file for authentication
-noagent disable use of Pageant
-agent enable use of Pageant
-batch disable all interactive prompts
-unsafe allow server-side wildcards (DANGEROUS)
-sftp force use of SFTP protocol
-scp force use of SCP protocol[@more@]常用的參數
-q quiet, don’t show statistics 安靜模式
-r copy directories recursively 遞迴模式,複製時包含子目錄
-l user connect with specified username 登入的使用者
-pw passw login with specified password 使用者的密碼
底下列出幾個實例
將 PotPlayerSetup64.exe 檔案複製到 Administrator 使用者的桌面
# echo -y | pscp -pw 123456 PotPlayerSetup64.exe Administrator@192.168.1.112:/cygdrive/c/Users/Administrator/Desktop
不顯示檔案傳輸時的訊息
# echo -y | pscp -pw 123456 -q CentOS-Server-6.5-x86_64_20140917.iso Administrator@192.168.1.112:/cygdrive/c/Users/Administrator/Desktop
複製時包含子目錄
# echo -y | pscp -pw 123456 -r noip-2.1.9-1 Administrator@192.168.1.112:/cygdrive/c/Users/Administrator/Desktop
noip2 | 70 kB | 71.0 kB/s | ETA: 00:00:00 | 100%
._redhat.noip.sh | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
redhat.noip.sh | 1 kB | 1.2 kB/s | ETA: 00:00:00 | 100%
noip2.c | 75 kB | 75.1 kB/s | ETA: 00:00:00 | 100%
Makefile | 0 kB | 1.0 kB/s | ETA: 00:00:00 | 100%
mac.osx.startup | 1 kB | 1.2 kB/s | ETA: 00:00:00 | 100%
README.FIRST_PT | 14 kB | 14.3 kB/s | ETA: 00:00:00 | 100%
debian.noip2.sh | 0 kB | 0.9 kB/s | ETA: 00:00:00 | 100%
README.FIRST.pt_BR | 12 kB | 12.2 kB/s | ETA: 00:00:00 | 100%
._mac.osx.startup | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
LIESMICH.ERST.deutsch | 14 kB | 14.1 kB/s | ETA: 00:00:00 | 100%
._debian.noip2.sh | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
._README.FIRST.FRANCAIS | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
._COPYING | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
._README.FIRST.ITALIANO | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
._Makefile | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
._noip2.c | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
LISEZMOI.ENPREMIER | 13 kB | 13.3 kB/s | ETA: 00:00:00 | 100%
README.FIRST.JAPANESE | 15 kB | 15.3 kB/s | ETA: 00:00:00 | 100%
README.FIRST.FRANCAIS | 13 kB | 13.1 kB/s | ETA: 00:00:00 | 100%
COPYING | 17 kB | 17.7 kB/s | ETA: 00:00:00 | 100%
gentoo.noip2.sh | 0 kB | 0.5 kB/s | ETA: 00:00:00 | 100%
README.FIRST-SWE | 12 kB | 12.9 kB/s | ETA: 00:00:00 | 100%
._README.FIRST | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
._noip2-i686 | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
._noip2-x86_64 | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
._gentoo.noip2.sh | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
._binaries | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
README.FIRST.ITALIANO | 14 kB | 14.1 kB/s | ETA: 00:00:00 | 100%
._README.FIRST.JAPANESE | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
._README.FIRST.pt_BR | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
._README.FIRST_PT | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
._README.FIRST-SWE | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
README.FIRST | 12 kB | 12.5 kB/s | ETA: 00:00:00 | 100%
._LISEZMOI.ENPREMIER | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
._LIESMICH.ERST.deutsch | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
._LEEME.PRIMERO | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%
LEEME.PRIMERO | 13 kB | 13.5 kB/s | ETA: 00:00:00 | 100%
同樣的,搭配 Script 也可以複製給電腦教室全部的電腦。