centos/redhat中SecureCRT终端 sshc
发布时间:01/15 来源: 浏览:
关键词:
这个程序纯属是偶然看到的,看博客上显示的语言来看,应该是一个俄罗斯的技术大拿写的。程序非常小,适合在终端下使用,在centos/redhat平台下测试OK,不过在ubuntu下测试时有问题,也没细究,还是直接上内容吧。
一、下载安装
代码如下 | |
[root@localhost src] wget http://cronylab.pl/codes/sshc-0.8.tar.gz [root@localhost src] tar zxvf sshc-0.8.tar.gz [root@localhost src] cd ssh_connector-0.8 [root@localhost ssh_connector-0.8]# sh install.sh [#] Uncompressing iniparser-2.17.tar.gz [#] Iniparser compilation in progress... compiling src/iniparser.c ... compiling src/dictionary.c ... compiling src/strlib.c ... a - src/iniparser.o a - src/dictionary.o a - src/strlib.o [#] Installing sshc in /usr/bin/ ... ssh_connector.c:24:21: error: ncurses.h: No such file or directory ssh_connector.c:28:18: error: menu.h: No such file or directory ssh_connector.c:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token ssh_connector.c:58: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token ssh_connector.c:59: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token ssh_connector.c:63: error: expected ‘)’ before ‘*’ token ssh_connector.c: In function ‘heart’: |
如上所示,安装时会报错。因为所需的ncurses.h头文件不存在 ,直接yum安装:
代码如下 | |
[root@localhost ssh_connector-0.8]# yum -y install ncurses ncurses-devel |
安装完再重新执行安装:
代码如下 | |
[root@localhost ssh_connector-0.8]# sh install.sh [#] Uncompressing iniparser-2.17.tar.gz [#] Iniparser compilation in progress... compiling src/iniparser.c ... compiling src/dictionary.c ... compiling src/strlib.c ... a - src/iniparser.o a - src/dictionary.o a - src/strlib.o [#] Installing sshc in /usr/bin/ ... [#] Installation completed [#] Example config was created in /root/.ssh/ssh_connector.conf and it must be there! (already copied;] ) |
二、使用
编译配置文件,如下:
代码如下 | |
[root@localhost .ssh]# cat /root/.ssh/ssh_connector.conf [test1] hostname = testowy1.test.pl username = test port = 22 auth = password [www] hostname = 192.168.10.12 username = test port = 321 auth = password [1.200] hostname = 192.168.1.200 username = root port = 22 auth = password |
注:认证方式这里选择的是密码方式 ,key方式没试 。
配置完配置文件后,直接运行sshc命令,调出如下的界面:
由于我这个图是在SecureCRT连接的服务器安装的截图,所以旁边会有乱码显示,再给一个直接在gnome、xfce桌面环境下终端的一个截图: