一种基于paramiko的工具,用于连接到远程服务器。
easycon的Python项目详细描述
轻松
连接到远程服务器的一种简单易用的工具,通过它可以方便地登录、上载和下载文件到远程服务器或从远程服务器下载文件也可以连接到NAT后面的服务器。这个工具是在paramiko
上开发的。
安装
pip install easycon
用法
直接在终端中通过run命令easycon
可以找到指令。
(对于windows用户,可以尝试easycon
或easycon.bat
)
下面给出一些示例:
- 登录远程服务器:
easycon --config <configfile> --login
(可以通过--mkconfig
获得<configfile>
模板) - 将文件(dir)上载到远程服务器:
easycon --config <configfile> --put <example.txt>
- 从服务器下载文件(dir):
easycon --config <configfile> --get <example.txt>
- 跳过NAT:
场景:需要登录位于私有子网(位于NAT后面)中的服务器,如下所示:local host
-->;jumpbox
-->;target
一个可以得到两个配置文件<jump.txt>
和<target.txt>
,并执行:easycon --config <target.txt> --jump <jump.txt>
在教学中可以找到更多。
更新
2019.04.02
add——动态(ssh-D)
2019.03.31
加法—跳转
2019.03.27
添加--登录
2019.03.16
更新sshapi
更新2019.03.10
支持Windows