1.0.1 • Published 6 years ago

qssh v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

qssh

A command tool to help users manage ssh servers easier

How to build qssh

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.

Move qssh into /usr/bin

Then, we have to move qssh this binary into /usr/bin

$ sudo mv ./qssh /usr/bin/

Add command into .zshrc or .bashrc

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
}

Active qssh command

Final, run source command to reload commands from file.

$ source ~/.zshrc

How to add a server

Type qssh --add in terminal and answer the following questions. Default categories are Development, Staging, and Production

npm.io

List all servers

npm.io

Connect to a ssh server

Select the server you want to connect to

npm.io

Enter again (default is Yes)

npm.io

Then it will connect to the ssh server!

Get help with qssh

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!

Issue Report

If there is any issues occur, feel feel free to contact me

1.0.1

6 years ago

1.0.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago