Manage your SSH like a boss!steemCreated with Sketch.

in #utopian-io7 years ago (edited)

4 years ago, when I just got back from my mandatory military duty, I was eager to write code, develop projects. As a result, I wrote stormssh one day and it got featured in hackernews, reddit and blogs.

Recently storm just passed 3k+ stars in github. I couldn't touch it in the last year much, I am planning to do a new major release with the waiting issues I need to solve. While working on that, I wanted to show off what is it and how can be helpful for people in the community. (Most of us playing servers at the end of the day...)

What is it?

storm is a command line tool to manage your ssh connections.

features

  • adding, editing, deleting, listing, searching across your SSHConfig.
  • command alias support for your CLI preferences.
  • support for custom SSH directives.
  • scriptable as a python library.
  • user interfaces besides CLI. (wxpython, unity(ubuntu) indicator.)

installation

installing it via pip:

$ [sudo] pip install stormssh

or if you like 90s:

$ [sudo] easy_install stormssh

or download and add storm directory to the your $PATH. E.g.

$ git clone git://github.com/emre/storm.git
$ export PATH=$PATH:`pwd`/storm/storm/bin/; storm

and install dependencies.

or if you use archlinux or opensuse:

DistroPackage
Archlinuxpython-stormssh
Opensusepython-stormssh

usage (From the official documentation)

adding hosts

$ storm add [-h]  [--id_file ID_FILE] name connection_uri

where -h, id_file are optional arguments.

example:

$ storm add my_vps [email protected]:22
my_vps added to your ssh config. you can connect it by typing "ssh my_vps".

example with id file.

$ storm add my_vps [email protected]:22 --id_file=--id_file=/Users/myusername/mykey.pem
my_vps added to your ssh config. you can connect it by typing "ssh my_vps".

editing hosts

storm edit [-h] [--id_file ID_FILE] name connection_uri

Where -h, id_file are optional arguments.

example:

$ storm edit my_vps [email protected]:2400
"my_vps" updated successfully.

updating multiple hosts all at once using regular expressions

storm update [-h] [--connection_uri CONNECTION_URI] [--id_file ID_FILE] name

Where -h, id_file and connection_uri are optional arguments.

example::

$ storm update my_vps-[1-5] --o user=emre
"my_vps-[1-5]" updated successfully.

deleting hosts

$ storm delete name

example::

$ storm delete my_vps
success hostname "my_vps" deleted successfully.

searching hosts

$ storm search git
Listing results for git:
  github -> [email protected]:22

listing hosts

$ storm list
Listing hosts:
  vps -> [email protected]:22
  netscaler -> [email protected]:8081

deleting all hosts

$ storm delete_all
all entries deleted.

custom ssh config directives

storm does not wrap/cover all of the SSHConfig directives since there is a billion of them. But,
other than adding it manually to your ssh config file, you can use --o parameter to accomplish this.

It works both add and edit sub commands.

$ storm add web-prod [email protected] --o "StrictHostKeyChecking=no" --o "UserKnownHostsFile=/dev/null"

command aliases

create a config file in /home/$user/.stormssh/config:

{
    "aliases": {
        "add": ["create", "touch"],
        "delete": ["rm"]
    }

}

connection uri format

  • user@server:port ([email protected]:22)
  • server:port (server.com:22)
  • server (server.com)

defaults for user -> $USER, port -> 22 if they are not specified.

see ssh_uri_parser for further look.

WEB UI

you can also use the web ui instead of commandline interface::

$ storm web
$ storm web 3333
$ storm web --debug

screens

web ui

Feel free to contribute.



Open Source Contribution posted via Utopian.io

Sort:  

I'd like to free some time and learn more about this. I've only dabbled in it when I had to....which has been like twice. Thanks for your post - I'm following!

Hello @emrebeyler can you change the category either in Development or Documentation? Visibility category is only when you are writing about the results of a promotional activity you made, online or offline. Let me know once done and I will accept it. Thanks

[utopian-moderator]

Done @elear. Sorry for the trouble.

Hey @emrebeyler I am @utopian-io. I have just super-voted you at 15% Power!

Suggestions https://utopian.io/rules

-Utopian has detected 1 bot votes. I am the only bot you should love!!

Achievements

-Good amount of information. Thank you!
-Much more informative than others in this category. Good job!
-You have less than 250 followers. Just gave you a gift ;)
-Seems like you contribute quite often. AMAZING!
-You have a good amount of votes on your contributions. Good job!
-In total you have more votes than average for this category. Bravo!
-You have just unlocked 6 achievements. Yeah!
Up-vote this comment to grow my power and help Open Source contributions like this one.



Hey @emrebeyler, here is a little bit of BEER for you. Enjoy it!

The @OriginalWorks BETA V2 bot has upvoted(0.5%) and checked this post!
Some similarity seems to be present here:
https://media.readthedocs.org/pdf/stormssh/latest/stormssh.pdf
This is an early BETA version. If you cited this source, then ignore this message! Reply if you feel this is an error.

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63330.55
ETH 2645.93
USDT 1.00
SBD 2.82