This is a basic and easy to use JAVA/SWING program used to send mutliple SSH or TELNET commands to one or several hosts.
All you need is to download the project and compile with Maven / Java. It will give you a self executable jar file, that you can use everywhere Java is installed.
You'll need at least JAVA 1.6 (or above) and MAVEN 2 (or above)
- Download the project folder.
- From the local copy, go in the project folder and execute: mvn clean install
- It will build the file SshCommander-X.X-jar-with-dependencies.jar
- It is an executable jar, that you can run either with the following command: java -jar SshCommander-X.X-jar-with-dependencies.jar
- either by double click on it (on windows for example).
- Maven - Dependency Management
- Quentin MORRIER - Creator - qmorrier
This project is licensed under the MIT License - see the LICENSE.md file for details
Based on JSCH
The hosts are declared as:
user:password@hostIp
And they are separated by a comma (,) char.
For example:
root:password@10.0.0.1,root:password@10.0.0.2,root:password@10.0.0.2
In case of multiple hosts, like in the above example, the commands are send sequentially host by host (no parallel execution).
There are two modes for sending commands:
- Exec mode : sends all the commands in one string (the carriage returns contained in the string applies the commands line by line)
- Shell mode : sends commands one by one (line by line). The last command must close the connection (like exit for a standart linux Ssh server)
In Shell mode, you can also add a pause between the commands.
You've to use the special syntax as follow:
==>WAIT( timeInMilliseconds)
So by example:
ls -l
==>WAIT(2000)
ls -l
Will execute ls, then wait 2 seconds, then execute the second ls.
You enter the list of commands in the Command area (bottom left).
The result of the execution is outputted in the Response area (bottom right).
For some SSH server like any standart Linux server, it is necessary to set the PATH environnement variable to find basic commands.
Here is the PATH that I commonly use:
PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/administrator/bin
The option Export as files, creates a directory in the same folder where the executable jar is, with as name the current date/time.
Within this folder, it creates one file per host holding the result of the command.
There is also a root file, wich hold all the logs (just like the Response area).
You can increase or degrease the font size via:
[CTRL] + mouse wheel
You can switch the dark theme to default SWING theme via:
[CTRL] + [b]