1 Star 0 Fork 0

sohunjug / connect.sh

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

使用connect.sh自动连接ssh或者telnet

其中配置文件conn.profile为json格式

配置样例:

{
   "test1": {
       "host": "192.168.0.1",
       "port": 22,
       "user": "root",
       "pass": "123456",
       "connecttype": "ssh",
       "sshtype": "pass",
       "language": "None"
   },
   "test2": {
       "host": "192.168.0.1",
       "port": 22,
       "user": "root",
       "pass": "123456",
       "connecttype": "ssh",
       "sshtype": "~/.ssh/test_rsa",
       "language": "en_US.UTF-8"
   },
   "test3": {
       "host": "192.168.0.1",
       "port": 23,
       "user": "root",
       "pass": "123456",
       "connecttype": "telnet",
       "language": "en_US.UTF-8"
   }
}

可以自定义设置别名

echo 'aliases="$HOME/Documents/ssh/connect.sh"' >> ~/.bashrc

之后执行

connect show test1

/test1/host           	192.168.0.1
/test1/port           	22
/test1/user           	root
/test1/pass           	123456
/test1/connecttype    	ssh
/test1/sshtype        	pass
/test1/language       	en_US.UTF-8

connect test1

Last login: Mon Aug  8 23:48:46 2016 from gateway
[root@clusterA31 ~]#

空文件

简介

暂无描述 展开 收起
Shell
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Shell
1
https://gitee.com/sohunjug/connect.sh.git
git@gitee.com:sohunjug/connect.sh.git
sohunjug
connect.sh
connect.sh
master

搜索帮助