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

WinSCP是一个Windows环境下使用SSH的开源图形化SFTP客户端。同时支持SCP协议。它的主要功能就是在本地与远程计算机间安全的复制文件。

直接在cmd下输入winscp进入winscp操作介面,查看帮助直接在下面输入help就可以看到所以可用到的命令。

连接到远程机器:
open root@192.168.2.19
输入密码就成功登录了

输入help:
winscp> help
call     执行任意远程Shell命令
cd       改变远程工作目录
chmod    改变远程文件权限
close    关闭会话
exit     关闭所有会话并结束程序
get      从远程目录下载文件到本地目录
help     显示帮助
keepuptodate 在一个远程目录连续反映本地目录的改变
lcd      改变本地工作目录
lls      列出本地目录的内容
ln       新建远程符号链接
lpwd     显示本地工作目录
ls       列出远程目录的内容
mkdir    新建远程目录
mv       移动或者重命名远程文件
open     连接到服务器
option   设置或显示脚本选项的值
put      从本地目录上传文件到远程目录
pwd      显示远程工作目录
rm       删除远程文件
rmdir    删除远程目录
session  列出连接的会话或者选择活动会话
synchronize 用一个本地目录同步远程目录

如果要查看某个命令的具体使用方法用:
help command
例,现在不记得synchroize的具体命令方法了,现在我可以使用:
help synchronize
winscp> help synchronize
synchronize local|remote|both [ <local directory> [ <remote directory> ] ]
  当第一个参数是'local'时,用远程与本地同步。
当第一个参数是'remote'时用本地目录同步远程目录。
当第一个参数是'both'用一个同步另一个。
当目录没有指定时,同步当前工作目录。
如果'synchdelete'设置为'on',旧文件会被删除。
注意:对这个命令,覆盖确认永远是关闭的。
影响的选项:
  transfer, synchdelete, exclude, include
范例:
  synchronize remote

synchronize both E:\resource /html/resource

synchronize remote E:\resource /html/resource

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

最新文章

  1. VS 编辑器扩展辅助工具
  2. etcd第三集
  3. html 表格的制作
  4. Java 中类的加载顺序
  5. Go语言学习资源
  6. C#_加密解密
  7. Spring web Flow2学习笔记
  8. Tomcat配置虚拟主机后的登录验证码问题
  9. jQuery.data的是jQuery的数据缓存系统
  10. C#+ArcEngine中com对象的释放问题
  11. linux如何查看端口被谁占用
  12. [Swift]LeetCode869. 重新排序得到 2 的幂 | Reordered Power of 2
  13. 服务器文档下载zip格式
  14. kvm虚拟化管理
  15. 获取页面定位元素left top
  16. git代码合并:Merge、Rebase的选择
  17. [err]default argument given for parameter 3 of &#39;***&#39;
  18. 初次接触Dynamics 365
  19. Xianfeng轻量级Java中间件平台:权限管理
  20. xshell5 Linux 上传下载文件

热门文章

  1. 有依赖的背包---P1064 金明的预算方案
  2. python 简化数据结构的初始化一
  3. python代码-leetcode1 两数相加
  4. Qt编写Onvif搜索及云台控制工具
  5. 各种修改Mysql字符集
  6. Redis键通知机制
  7. 利用python求解物理学中的双弹簧质能系统详解
  8. Kafka——副本(Replica)机制
  9. ubuntu 18.04安装jdk8和eclipse
  10. 第四章 INI配置——《跟我学Shiro》