赞
踩
在上面按照提示输入想要连接的主机名或者IP地址,Saved Session(保存会话),随便输入,可以直接复制上面的IP地址便于记忆,点击Save保存输入的信息,点击Open之后可以使用用户名+密码登陆了
点击Category->Connection,看到Seconds between keepalives(0 to turn off)【 0 】
这里说的就是设置保持生命期的时间,以秒为单位,我们设置为20,表示每隔20秒就会putty就会向远程主机发送空的数据包保持连接
需要将命令行目录改变到pscp.exe文件所在的目录,如果需要在哪里都可以使用pscp,则可以将pscp.exe放到C:\Windows\System32>目录下即可
使用pscp查看远程主机的文件目录
PuTTY Secure Copy client
Release 0.65
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
-unsafe allow server-side wildcards (DANGEROUS)
-sftp force use of SFTP protocol
-scp force use of SCP protocol
使用 pscp [options] -ls [user@]host:filespec
pscp -pw 123456 -ls root@123.57.22.75:/
可以查看123.57.22.75下的/(跟目录)目录的文件夹信息
传输单个文件F:/word.txt到主机123.57.22.75下的/home目录
pscp -l root -pw 123456 F:/word.txt 123.57.22.75:/home
传输多个文件可以使用星号(*)表示传输多个文件例如
pscp -l root -pw 123456 F:\* 123.57.22.75:/home
表示传输本地windows系统的F盘下的所有文件都传输到123.57.22.75下的/home目录
需要将命令行目录改变到pscp.exe文件所在的目录,如果需要在哪里都可以使用pscp,则可以将pscp.exe放到C:\Windows\System32>目录下即可
I:在命令行下输入psftp就可以进入psftp了,之后输入help就可以查看psftp的命令
II:在命令行下输入psftp -l root -pw 123456 123.57.22.75 就可以完成登录到123.57.22.75了
! run a local command
bye finish your SFTP session
cd change your remote working directory
chmod change file permissions and modes
close finish your SFTP session but do not quit PSFTP
del delete files on the remote server
dir list remote files
exit finish your SFTP session
get download a file from the server to your local machine
help give help
lcd change local working directory
lpwd print local working directory
ls list remote files
mget download multiple files at once
mkdir create directories on the remote server
mput upload multiple files at once
mv move or rename file(s) on the remote server
open connect to a host
put upload a file from your local machine to the server
pwd print your remote working directory
quit finish your SFTP session
reget continue downloading files
ren move or rename file(s) on the remote server
reput continue uploading files
rm delete files on the remote server
rmdir remove directories on the remote server
可以上传下载过个文件,具体使用help查看psftp的命令,记住help需要进入到psftp才可以查看到psftp的命令
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。