A command tool to help users manage ssh servers easier
Follow the following steps,
- Git clone project first, repo:
http://github.com/zxcvbnius/qssh
- Run
npm install
- Install nexe, See info
- Install glup, See info
- Run npm run-script build
You will find there are a binary file qssh in current folder.
Then, we have to move qssh this binary into /usr/bin
$ sudo mv ./qssh /usr/bin/
Add the following scripts into .zshrc
or .bashrc
qssh() {
script=$HOME/.qssh-tmp-$((RANDOM % 100))
NODE_SCRIPT="$script" /usr/bin/qssh $@
if [ -f "$script" ]
then
connect=`cat ${script}`
rm -f ${script}
eval "${connect}"
else
echo "Bye!"
fi
}
Final, run source
command to reload commands from file.
$ source ~/.zshrc
Type qssh --add
in terminal and answer the following questions.
Default categories are Development, Staging, and Production
Select the server you want to connect to
Enter again (default is Yes)
Then it will connect to the ssh server!
Use qssh --help
to see more detail.
> qssh --help
usage: qssh.js [-h] [-v] [-ls] [-y] [-p] [--add]
ssh-connet command message
Optional arguments:
-h, --help Show this help message and exit.
-v, --version Show program's version number and exit.
-ls, --list list all servers
-y, --yes automatic yes to prompts
-p, --ping test if qssh works well
--add add new server
See License at http://opensource.org/licenses/MIT
Bye!
If there is any issues occur, feel feel free to contact me