SSH Management Console Script

Hi Guys

SSH Management Console Script naming “sshc” is a simple program that you can use it instead of putty connection manager , securecrt , PAC manager or any SSH manager that installed on linux distributions .

This program is so simple, secure and accessible from shell . I mean You can install it on your server for connection to another servers from a linux server .

Note : This Script Written By My Best Friend Iman Homayouni [e2ma3n] .

How Can I Install this Program on My Server ?

At the First We Must Wget sshc on our server . ( in this case my operating system is centos 6.7 )

Download-sshc

At The Next Step According to README file We Should install Prerequisites that listed Bellow :

0. openssl
1. sshpass
2. mkdir
3. cp
4. rm
5. whoami
6. ping
7. curl
8. ssh
9. echo
10. cat
11. joe

yum -y install openssl sshpass curl ssh joe

Then We Must install sshc with install.sh :

[root@srv10829 sshc-master]# chmod +x install.sh
[root@srv10829 sshc-master]# ./install.sh
Usage:
        sudo ./install.sh -i [for install program]
        sudo ./install.sh -u [for uninstall program]
        sudo ./install.sh -c [check dependencies on system]
[root@srv10829 sshc-master]#

Checking Dependencies

We can Check Dependencies with -c switch :

[root@srv10829 sshc-master]# ./install.sh -c
[+] ------------------------------------------------ [+]
[+] check dependencies on system:
[+] openssl found
[+] sshpass found
[+] mkdir found
[+] cp found
[+] rm found
[+] whoami found
[+] ping found
[+] curl found
[+] ssh found
[+] echo found
[+] cat found
[+] joe found
[+] ------------------------------------------------ [+]
[root@srv10829 sshc-master]#

Installing 

[root@srv10829 sshc-master]# ./install.sh -i
[!] Warning: run program and edit your database.
[!] Warning: defaul password is 'sshc'
[+] Done
[root@srv10829 sshc-master]#

after install We Should Run “sshc” command to complete sshc database (defaul password is ‘sshc’)

sshc

after typing password we must select 0 for editing database :

[+] Enter password:

 0) Edite Database

[+] Select your server/option or type quit for exit:0

default editor of sshc database is joe , for saving settings we should press ctrl+k+x

sshc_database

Note : Add Your Servers According to the above Example .

After Save, Console shows it :

File /etc/sshc/sshc.database.de saved
[+] encrypt new database, Please type your password:
[+] Done, New database saved and encrypted
[+] ------------------------------------------------------------------- [+]

The program requests default password for encrypting database file . lets run again sshc for connecting our server :

sshc_connection

We Have 3 Options for Direct Connection to server or Accept our public ip on server firewall ( iptables ) or 1 and 2 options in 3 .

This is Encrypted Database File :

[root@srv10829 sshc-master]# cat /etc/sshc/sshc.database.en
U2FsdGVkX1/nKUyRvda1fRkxpB7XAGhjFy/c5P2vBK0Sv5JMQEkeZ03BG1ROkQiR
QYmeLhsNThARB3A4Ir5IRF7f3pLsK/aGZTBwIIB1FjxvsSOSOQRlnz4kMma0mHNa
kh8ggJ5DDVHzPnW1eT3CJQeKYZR3ohXTI4jIxFgLg/VdHK1iCH3SsRyRbMC21Lle
SnoJARLQcGeLY/JjPp3Q/dJ1BbOt9zxb7HCoAk2J2YnKQWIMlA8k3ulQG5/ARTkE
/GXXML/2yu0K5SQ5FuFPtBdATUcCjVrkcWJTA69bumTuEFzkX0BKAYpO9UUxiFzl
xRwkcZe/cXbfXVYgbCZSjBwALhokT/6CWX0c8UgqGlFwUCLw195U9YC4DAMqTo12
rpg8xdln4lleBgSIuDb+rqYW0g9EHznaR43V0N0zxwv7fvH7H5GOXtFZr4Q6hHRn
aDoZRouAls7AN0OgNG9Ed5x7UHgAmZDfi9DZed55NeahtxQ3MGt9vdL2ro6oz7/m
[root@srv10829 sshc-master]#

You can check this links for updates of this program .

Hope you enjoyed the article , if you have any questions just post a comment 🙂

Good Luck