pscp --windows上下载远程SSH服务器实用工具

1、下载pscp.exe         pscp.exe 工具下载地址

下载完后,复制粘贴到C:\Windows\System32目录下,以便我们来调用。或者将下载文件的路径添加到系统环境变量中。

2、pscp工具使用

(1)上传本地文件到SSH服务器

// 将本地D盘目录下的a.txt 文件上传到SSH服务器others目录下。
// other: SSH服务器登录名称
pscp -scp D:\a.txt others@server-ip:/home/others/

(2)从SSH服务器下载文件到本地

譬如:从远程SSH服务器服务器下载一个叫做text的文件夹到本地pc的 “D:/ ” 目录下

pscp -scp -r others@server-ip:/home/others/text/  D:/

更多选项,可参照pscp的帮助文档,如下:

PS C:\WINDOWS\system32> pscp /?

PuTTY Secure Copy client

Release 0.73

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 user authentication

-noagent disable use of Pageant

-agent enable use of Pageant

-hostkey aa:bb:cc:...

manually specify a host key (may be repeated)

-batch disable all interactive prompts

-no-sanitise-stderr don't strip control chars from standard error

-proxycmd command

use 'command' as local proxy

-unsafe allow server-side wildcards (DANGEROUS)

-sftp force use of SFTP protocol

-scp force use of SCP protocol

-sshlog file

-sshrawlog file

log protocol details to a file

 

你可能感兴趣的:(实用工具和技术,windows,pscp,上下载远程SSH服务器,windows,SSH服务器,远程上下载)