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] [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
putty和psftp命令行参数的更多相关文章
- python处理命令行参数
直接从命令行执行py文件的时候如果带有参数,如何获取这些参数,如何解析? http://blog.chinaunix.net/uid-20786165-id-3182268.html sys.argv ...
- .NET Core采用的全新配置系统[5]: 聊聊默认支持的各种配置源[内存变量,环境变量和命令行参数]
较之传统通过App.config和Web.config这两个XML文件承载的配置系统,.NET Core采用的这个全新的配置模型的最大一个优势就是针对多种不同配置源的支持.我们可以将内存变量.命令行参 ...
- Shell特殊变量:Shell $0, $#, $*, $@, $?, $$和命令行参数
特殊变量列表 变量 含义 $0 当前脚本的文件名 $n 传递给脚本或函数的参数.n 是一个数字,表示第几个参数.例如,第一个参数是$1,第二个参数是$2. $# 传递给脚本或函数的参数个数. $* 传 ...
- powershell脚本,命令行参数传值,并绑定变量的例子
这是小技巧文章,所以文章不长.但原创唯一,非常重要.我搜了下,还真没有人发 powershell怎样 [命令行 参数 绑定],所以我决定写成博客. 搜索关键字如下: powershell 命令行 参数 ...
- VS2013 带命令行参数的调试问题 解决方案
int main(int argc,char* argv[]) argc是命令行总的参数个数,argv[]是argc个参数,其中第0个参数是程序的全名,以后的参数命令行后面跟的用户输入的参数 比如: ...
- 使用getopt()处理命令行参数
假设有一程序 testopt,其命令行选项参数有: -i 选项 -l 选项 -r 选项 -n <值> 带关联值的选项 则处理 ...
- 7z命令行参数中的路径
最近在自动化的过程中用到了7z命令行工具,发现其参数中的路径挺有意思的,在此总结一下.本文中所有demo使用的7z版本为:15.14 x64. 压缩某个文件夹 下面的命令会把g:\temp\目录和目录 ...
- [转]Python 命令行参数和getopt模块详解
FROM : http://www.tuicool.com/articles/jaqQvq 有时候我们需要写一些脚本处理一些任务,这时候往往需要提供一些命令行参数,根据不同参数进行不同的处理,在Pyt ...
- 你可能不知道的Google Chrome命令行参数
概述: 关于Google Chrome命令行参数(英文叫Google Chrome Command line switches),是Chrome为了实现实验性功能.方便调试. ...
随机推荐
- OpenJudge计算概论-找出第k大的数
/*================================================ 找出第k大的数 总时间限制: 1000ms 内存限制: 1000kB 描述 用户输入N和K,然后接 ...
- ArcGIS 10.5 tensorflow安装日记
ArcGIS 10.5 tensorflow安装日记 商务科技合作:向日葵,135-4855__4328,xiexiaokui#qq.com Datetime: 2019年5月27日星期一 Os: w ...
- osg osgViewer::View::setUpViewInWindow()
void ViewerBase::frame(double simulationTime) { if (_done) return; // OSG_NOTICE<<std::endl< ...
- Java 8 Steam 例子整理
Java 8 Steam 例子整理 kexue 关注 2016.06.06 17:44* 字数 1860 阅读 3901评论 0喜欢 6 IBM: Java 8 中的 Streams API 详解 为 ...
- C#泛型学习
什么是泛型 泛型是程序设计语言的一种特性.允许程序员在强类型程序设计语言中编写代码时定义一些可变部分,那些部分在使用前必须作出指明.各种程序设计语言和其编译器.运行环境对泛型的支持均不一样.将类型参数 ...
- 多线程,线程池与BeginInvoke()
在WinForm中,很多情况下需要用到多线程,下面我来简单介绍一下多线程的基本用法. 1.线程. (1)线程的初始化 Thread t = new Thread(new ThreadStart( ...
- CentOS设置交换分区swap
环境查看 查看未设置交换分区之前 free -h 新加一块磁盘用于交换分区/dev/sdc 格式化 mkswap /dev/sdc 设置为交换分区 swapon /dev/sdc 再次查看 设置为重启 ...
- talking data 集成
talking data 集成需要手动添加libz.td
- Work? working!
0.总要想想为什要做这个(目的是什么,优缺点,必要性,不用行不行,产品定位,如何保证最后的稳定性) 1.如何逐步排查问题所在(做实验+分析排查:不同的实验手段) 2.如何利用网络(搜索问题的所在,确定 ...
- 最新 京东java校招面经 (含整理过的面试题大全)
从6月到10月,经过4个月努力和坚持,自己有幸拿到了网易雷火.京东.去哪儿等10家互联网公司的校招Offer,因为某些自身原因最终选择了京东.6.7月主要是做系统复习.项目复盘.LeetCode与牛客 ...