首页 > 文章 > putty和psftp命令行参数

putty和psftp命令行参数

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] [[email protected]]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] [[email protected]]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

 

时间:2019-08-16 10:05:06阅读(2626)
联系我们 - 留言反馈
© 2017 版权所有 鲁ICP备17052893号