windows下在没有FTP的情况如何拉取Linux服务器的文件
前提条件:
1、windows系统安装putty
2、linux系统开通了SFTP协议
从windows系统拉取linux系统的备份数据。
打开 CMD 命令符,在命令行里输入:
c:\putty\pscp -sftp -v -r -P 端口 远程服务器用户@远程服务器地址:文件路径(绝对路径) 本地保存路径(存放目录)
C:\Windows\system32>c:\putty\pscp -sftp -v -r -P 32223 getdbback@172.16.11.153:/home/dbbak/bak21-09-29-00*.gz e:\dbbak\oa\ Connecting to 172.16.11.153 port 32223 We claim version: SSH-2.0-PuTTY_Release_0.70 Server version: SSH-2.0-OpenSSH_5.3 We believe remote version has SSH-2 channel request bug Using SSH protocol version 2 Doing Diffie-Hellman group exchange Doing Diffie-Hellman key exchange with hash SHA-256 Server also has ssh-dss host key, but we don't know it Host key fingerprint is: ssh-rsa 2048 4f:a4:63:3e:1c:1d:c6:5d:02:93:3c:20:2c:e6:f4:26 Initialised AES-256 SDCTR client->server encryption Initialised HMAC-SHA-256 client->server MAC algorithm Initialised AES-256 SDCTR server->client encryption Initialised HMAC-SHA-256 server->client MAC algorithm Using username "getdbback". Using SSPI from SECUR32.DLL Attempting GSSAPI authentication GSSAPI authentication request refused getdbback@172.16.11.153's password: Sent password Access granted Opening session as main channel Opened main channel Started a shell/command Using SFTP Connected to 172.16.11.153 kzoabak21-09-29-00.dmp.gz | 1045760 kB | 576.2 kB/s | ETA: 00:35:02 | 46%Initiating key re-exchange (too much data received) Doing Diffie-Hellman group exchange Doing Diffie-Hellman key exchange with hash SHA-256 Initialised AES-256 SDCTR client->server encryption Initialised HMAC-SHA-256 client->server MAC algorithm Initialised AES-256 SDCTR server->client encryption Initialised HMAC-SHA-256 server->client MAC algorithm kzoabak21-09-29-00.dmp.gz | 2089824 kB | 887.4 kB/s | ETA: 00:03:08 | 92%Initiating key re-exchange (too much data received) Doing Diffie-Hellman group exchange Doing Diffie-Hellman key exchange with hash SHA-256 Initialised AES-256 SDCTR client->server encryption Initialised HMAC-SHA-256 client->server MAC algorithm Initialised AES-256 SDCTR server->client encryption Initialised HMAC-SHA-256 server->client MAC algorithm kzoabak21-09-29-00.dmp.gz | 2257013 kB | 930.0 kB/s | ETA: 00:00:00 | 100% kzoabak21-09-29-00.log.gz | 21 kB | 21.0 kB/s | ETA: 00:00:00 | 100% Sent EOF message Server sent command exit status 0 Disconnected: All channels closed
把windows系统的文件发送到linux系统里
c:\putty\pscp -sftp -v -r -P 端口 本地文件路径(绝对路径) 远程服务器用户名@远程服务器地址:存放路径