首页 > 其他 > 详细

putty和psftp命令行参数

时间:2019-08-16 11:22:45      阅读:148      评论:0      收藏:0      [点我收藏+]

putty和psftp命令行参数

 

https://the.earth.li/~sgtatham/putty/latest/w32/putty.zip

https://the.earth.li/~sgtatham/putty/latest/w64/putty.zip

https://the.earth.li/~sgtatham/putty/latest/puttydoc.zip

https://the.earth.li/~sgtatham/putty/latest/putty-0.72.tar.gz

https://the.earth.li/~sgtatham/putty/latest/putty-src.zip

https://git.tartarus.org/?p=simon/putty.git

 

技术分享图片

 

putty.exe [-ssh | -telnet | -rlogin | -raw] [user@]host
Example: putty -ssh -l vagrant -pw vagrant -P 2222 127.0.0.1

 -V        print version information and exit
 -pgpfp    print PGP key fingerprints and exit
 -v        show verbose messages
 -load sessname  Load settings from saved session
 -ssh -telnet -rlogin -raw            force use of a particular protocol
 -P port   connect to specified port
 -l user   connect with specified username
 -batch    disable all interactive prompts The following options only apply to SSH connections:  -pw passw login with specified password
 -D [listen-IP:]listen-port           Dynamic SOCKS-based port forwarding
 -L [listen-IP:]listen-port:host:port            Forward local port to remote address
 -R [listen-IP:]listen-port:host:port            Forward remote port to local address
 -X -x     enable / disable X11 forwarding
-A -a     enable / disable agent forwarding
 -t -T     enable / disable pty allocation
-1 -2     force use of particular protocol version
-4 -6     force use of IPv4 or IPv6
 -C        enable compression
-i key    private key file for authentication
 -m file   read remote command(s) from file
 -s        remote command is an SSH subsystem (SSH-2 only)
 -N        don‘t start a shell/command (SSH-2 only)

 

例如如下bat脚本的内容:

 

comd.txt

echo ./backup_tomcat.sh > comd.txt
echo exit >> comd.txt

 

putty -ssh -l %user% -pw %pwd% -P %port% %ip% -m comd.txt >> aa.log

 

 

>psftp -h
PuTTY Secure File Transfer (SFTP) client
Release 0.63
Usage: psftp [options] [user@]host
Options:
  -V        print version information and exit
  -pgpfp    print PGP key fingerprints and exit
  -b file   use specified batchfile
  -bc       output batchfile commands
  -be       don‘t stop batchfile processing if errors
  -v        show verbose messages
  -load sessname  Load settings from saved session
  -l user   connect with specified username
  -P port   connect to specified port
  -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

 

=============== End

 

putty和psftp命令行参数

原文:https://www.cnblogs.com/lsgxeva/p/11361972.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!