windows 与linux 通过pscp 进行文件传输

本文介绍了如何通过pscp.exe工具实现Windows系统与远程Linux系统的文件传输。首先需要下载并安装pscp.exe,并将其路径添加到系统环境变量Path中。然后,通过命令行使用pscp命令,可以轻松地在本地和远程Linux系统之间复制文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

第一 下载pscp.exe文件

第二 将pscp.exe的路径加入到系统环境变量Path中,这样我们就可以在Windows的命令行下使用pscp命令了。

F:\AppServ\Apache2.2\bin;F:\AppServ\php5;F:\AppServ\MySQL\bin;C:\Program Files (x86)\SSH Communications Security\SSH Secure Shell;C:\Users\Default\Pscp

第三 此时使用pscp命令既可以拷贝文件到远端的Linux系统中,或者从远端的Linux系统中拷贝文件到当前路径,该命令使用方法类似于Linux下的scp命令。

Microsoft Windows [版本 6.3.9600]
(c) 2013 Microsoft Corporation。保留所有权利。

C:\Users\lenovo>pscp
PuTTY Secure Copy client
Release 0.62
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

C:\Users\lenovo>pscp D:\123.txt root@192.168.3.1*1:/root/data
root@192.168.3.1*1's password:

C:\Users\lenovo>


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值