Giter Site home page Giter Site logo

emre / storm Goto Github PK

View Code? Open in Web Editor NEW
3.9K 85.0 175.0 449 KB

Manage your SSH like a boss.

Home Page: http://stormssh.readthedocs.org/en/master/

License: MIT License

Shell 4.77% Python 73.95% CSS 12.60% JavaScript 6.12% HTML 2.56%
python ssh sshconfig

storm's Introduction

---

Join the chat at https://gitter.im/emre/storm

Build Status

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. (web ui, wxpython, unity(ubuntu) indicator.)

dependencies

On Debian systems, install header files and a static library for Python (python3.4-dev or python2.7-dev)

On Ubuntu 16.04, you need install libssl-dev and libffi-dev (sudo apt-get install libssl-dev libffi-dev)

installation

$ [sudo] pip install stormssh

or if you like 90s:

$ [sudo] easy_install stormssh

or if you like homebrew:

$ brew install stormssh

or if prefer using a package manager in your distro:

Distro Package
Archlinux python-stormssh
Opensuse python-stormssh
Void Linux python-stormssh

troubleshooting installation

clang: error: unknown argument: '-mno-fused-madd'

error: command 'cc' failed with exit status 1

See #73. If the issue persists, see also #76 .

usage & documentation

http://stormssh.readthedocs.org/en/master/

screens

web ui

storm's People

Contributors

abhinav-upadhyay avatar aleno avatar bengt avatar benvand avatar berkerpeksag avatar bryant1410 avatar danielboloc avatar diogoleal avatar emre avatar erronjason avatar f avatar gitter-badger avatar haroenv avatar henrysher avatar jeunito avatar lowks avatar mswell avatar philwrenn avatar playpauseandstop avatar sylvainde avatar tawanda avatar vigo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

storm's Issues

Can't install on OSX 10.9.2 :(

Hi,

I am trying to install storm on my mac but I face a failure after: sudo pip install stormssh

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -Wall -Wstrict-prototypes -Wshorten-64-to-32 -fwrapv -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD2.c -o build/temp.macosx-10.9-intel-2.7/src/MD2.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-IwVdk7-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/pycrypto
Storing debug log for failure in /Users/cyrillakech/Library/Logs/pip.log

Same with easy_install of course.

Any hint ?

Use canonically-named config option names

The SSH manpage uses CamelCase names for all the config option names. While it allows for varying cases, that is the canonical form. Storm should respect that.

As a variant of this, it looks like Storm uses the names as strings everywhere in the code. If it used constants for keys then it would not only ensure consistency in the codebase (and prevent typo-related errors) but allow for the user to choose which set of keys to use (and allow Storm to auto-detect based on the current config file form).

no module named manage

Attempting to run on cygwin (Windows). Installed per readme, returned with error:

$ storm
Traceback (most recent call last):
  File "/cygdrive/c/Users/jhertens/storm/storm/bin/storm", line 4, in <module>
    from manage import Manager
ImportError: No module named manage

No module named __main__

When run storm, I got the following errors:

Traceback (most recent call last):
  File "/usr/bin/storm", line 9, in 
    load_entry_point('stormssh==0.5.2', 'console_scripts', 'storm')()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 357, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2394, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2108, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
ImportError: No module named __main__

Python version: 2.6.8
setuptools version: 2.0.1
OS: CentOS 5.8

Please help me. Thanks.

Can't find the actual storm binary

I should preface this by saying there may be something I'm doing wrong, since I don't have a lot of experience with pip.

That said, I ran pip install storm under Mac OS/X via pip which I installed via Python 2.7 which I installed via brew. After installation, I can't find any instance of the storm binary:

[rocco:/usr/local ] $ !find
find . -type f -name storm
[rocco:/usr/local ] $

I suspect I might be doing something wrong, and would appreciate any guidance. I saw the tool mentioned on Hacker News this morning and would love to try it out. :-)

Thanks,

-- Doug

Possible config file parsing error

Hi,

currently my ~/.ssh/config file looks like this:

Host *
User ec2-user
IdentityFile ~/.ssh/my-cert.pem

Host dev-api
HostName ec2-...compute.amazonaws.com

Host dev-webapp
HostName ec2-...compute.amazonaws.com

I can simple put any host alias to ssh command without specifying ec2-user as username or any other options. Command storm list shows:

listing entries:

    dev-api -> [email protected]:22

    dev-webapp -> [email protected]:22

(*) -> identityfile:
    ~/.ssh/my-cert.pem
    user:ec2-user

You can see wrong local username in listing entries. It means that storm doesn't interpret asterisk in first Host entry as template for every other entries.

Can storm parse any config files and this is a bug, or can parse only config files managed by storm itself?

getpass error

I don't know Python very well, but I found that without an import getpass in init.py, I got an error whenever I tried to use storm search:

error    global name 'getpass' is not defined

Adding the import fixed it.

Enhancement: Making "storm list" output a little better

Two things I can think of:

  1. Capitalizing "listing entries"
  2. Since we are already using colored(host["host"], ... why not use another color say like green, something like the "success" and "error" status messages would be nice.

installation error on osx yosemite (easy_install)

full log:

~ โฏ sudo easy_install stormssh                                                                                                 โŽ
Searching for stormssh
Reading https://pypi.python.org/simple/stormssh/
Best match: stormssh 0.6.5
Downloading https://pypi.python.org/packages/source/s/stormssh/stormssh-0.6.5.tar.gz#md5=38a82b61bd3eb483657b9a7b7204e946
Processing stormssh-0.6.5.tar.gz
Writing /tmp/easy_install-6w7FK9/stormssh-0.6.5/setup.cfg
Running stormssh-0.6.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-6w7FK9/stormssh-0.6.5/egg-dist-tmp-5QEAx6
zip_safe flag not set; analyzing archive contents...
storm.web: module references __file__
Adding stormssh 0.6.5 to easy-install.pth file
Installing storm script to /usr/local/bin

Installed /Library/Python/2.7/site-packages/stormssh-0.6.5-py2.7.egg
Processing dependencies for stormssh
Searching for flask
Reading https://pypi.python.org/simple/flask/
Best match: Flask 0.10.1
Downloading https://pypi.python.org/packages/source/F/Flask/Flask-0.10.1.tar.gz#md5=378670fe456957eb3c27ddaef60b2b24
Processing Flask-0.10.1.tar.gz
Writing /tmp/easy_install-XC5Zl8/Flask-0.10.1/setup.cfg
Running Flask-0.10.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-XC5Zl8/Flask-0.10.1/egg-dist-tmp-_XdZpv
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
warning: no previously-included files matching '*.pyc' found under directory 'tests'
warning: no previously-included files matching '*.pyo' found under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'examples'
warning: no previously-included files matching '*.pyo' found under directory 'examples'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'docs/_themes/.git'
Adding Flask 0.10.1 to easy-install.pth file

Installed /Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg
Searching for termcolor
Reading https://pypi.python.org/simple/termcolor/
Best match: termcolor 1.1.0
Downloading https://pypi.python.org/packages/source/t/termcolor/termcolor-1.1.0.tar.gz#md5=043e89644f8909d462fbbfa511c768df
Processing termcolor-1.1.0.tar.gz
Writing /tmp/easy_install-nf36UM/termcolor-1.1.0/setup.cfg
Running termcolor-1.1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-nf36UM/termcolor-1.1.0/egg-dist-tmp-xRtjpY
zip_safe flag not set; analyzing archive contents...
Adding termcolor 1.1.0 to easy-install.pth file

Installed /Library/Python/2.7/site-packages/termcolor-1.1.0-py2.7.egg
Searching for paramiko
Reading https://pypi.python.org/simple/paramiko/
Best match: paramiko 1.15.1
Downloading https://pypi.python.org/packages/source/p/paramiko/paramiko-1.15.1.tar.gz#md5=48c274c3f9b1282932567b21f6acf3b5
Processing paramiko-1.15.1.tar.gz
Writing /tmp/easy_install-91t7VN/paramiko-1.15.1/setup.cfg
Running paramiko-1.15.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-91t7VN/paramiko-1.15.1/egg-dist-tmp-SZPghq
zip_safe flag not set; analyzing archive contents...
Adding paramiko 1.15.1 to easy-install.pth file

Installed /Library/Python/2.7/site-packages/paramiko-1.15.1-py2.7.egg
Searching for itsdangerous>=0.21
Reading https://pypi.python.org/simple/itsdangerous/
Best match: itsdangerous 0.24
Downloading https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-0.24.tar.gz#md5=a3d55aa79369aef5345c036a8a26307f
Processing itsdangerous-0.24.tar.gz
Writing /tmp/easy_install-Uvqc3C/itsdangerous-0.24/setup.cfg
Running itsdangerous-0.24/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Uvqc3C/itsdangerous-0.24/egg-dist-tmp-vIDI6Q
warning: no previously-included files matching '*' found under directory 'docs/_build'
Adding itsdangerous 0.24 to easy-install.pth file

Installed /Library/Python/2.7/site-packages/itsdangerous-0.24-py2.7.egg
Searching for Jinja2>=2.4
Reading https://pypi.python.org/simple/Jinja2/
Best match: Jinja2 2.7.3
Downloading https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz#md5=b9dffd2f3b43d673802fe857c8445b1a
Processing Jinja2-2.7.3.tar.gz
Writing /tmp/easy_install-V2mWvj/Jinja2-2.7.3/setup.cfg
Running Jinja2-2.7.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-V2mWvj/Jinja2-2.7.3/egg-dist-tmp-SISMG0
warning: no files found matching '*' under directory 'custom_fixers'
warning: no previously-included files matching '*' found under directory 'docs/_build'
warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
Adding Jinja2 2.7.3 to easy-install.pth file

Installed /Library/Python/2.7/site-packages/Jinja2-2.7.3-py2.7.egg
Searching for Werkzeug>=0.7
Reading https://pypi.python.org/simple/Werkzeug/
Best match: Werkzeug 0.9.6
Downloading https://pypi.python.org/packages/source/W/Werkzeug/Werkzeug-0.9.6.tar.gz#md5=f7afcadc03b0f2267bdc156c34586043


Processing Werkzeug-0.9.6.tar.gz
Writing /tmp/easy_install-6KDzpg/Werkzeug-0.9.6/setup.cfg
Running Werkzeug-0.9.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-6KDzpg/Werkzeug-0.9.6/egg-dist-tmp-YUjIyQ
warning: no files found matching '*' under directory 'werkzeug/debug/templates'
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
warning: no previously-included files matching '*.pyc' found under directory 'tests'
warning: no previously-included files matching '*.pyo' found under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'examples'
warning: no previously-included files matching '*.pyo' found under directory 'examples'
no previously-included directories found matching 'docs/_build'
Adding Werkzeug 0.9.6 to easy-install.pth file

Installed /Library/Python/2.7/site-packages/Werkzeug-0.9.6-py2.7.egg
Searching for ecdsa>=0.11
Reading https://pypi.python.org/simple/ecdsa/
Best match: ecdsa 0.11
Downloading https://pypi.python.org/packages/source/e/ecdsa/ecdsa-0.11.tar.gz#md5=8ef586fe4dbb156697d756900cb41d7c
Processing ecdsa-0.11.tar.gz
Writing /tmp/easy_install-1FQ3XS/ecdsa-0.11/setup.cfg
Running ecdsa-0.11/setup.py -q bdist_egg --dist-dir /tmp/easy_install-1FQ3XS/ecdsa-0.11/egg-dist-tmp-WbKN4C
zip_safe flag not set; analyzing archive contents...
Adding ecdsa 0.11 to easy-install.pth file

Installed /Library/Python/2.7/site-packages/ecdsa-0.11-py2.7.egg
Searching for pycrypto>=2.1,!=2.4
Reading https://pypi.python.org/simple/pycrypto/
Best match: pycrypto 2.6.1
Downloading https://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz#md5=55a61a054aa66812daf5161a0d5d7eda
Processing pycrypto-2.6.1.tar.gz
Writing /tmp/easy_install-oJ3s2g/pycrypto-2.6.1/setup.cfg
Running pycrypto-2.6.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-oJ3s2g/pycrypto-2.6.1/egg-dist-tmp-CWckwa
configure: error: in `/private/tmp/easy_install-oJ3s2g/pycrypto-2.6.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
Traceback (most recent call last):
  File "/usr/bin/easy_install-2.7", line 11, in <module>
    load_entry_point('setuptools==1.1.6', 'console_scripts', 'easy_install')()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 1925, in main
    with_ei_usage(lambda:
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 1912, in with_ei_usage
    return f()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 1929, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 374, in run
    self.easy_install(spec, not self.no_deps)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 609, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 641, in install_item
    self.process_distribution(spec, dist, deps)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 687, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 568, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 806, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 818, in obtain
    return installer(requirement)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 609, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 639, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 825, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 1031, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 1016, in run_setup
    run_setup(setup_script, args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 69, in run_setup
    lambda: execfile(
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 120, in run
    return func()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 71, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 456, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/bdist_egg.py", line 185, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/bdist_egg.py", line 171, in call_command
    self.run_command(cmdname)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/install_lib.py", line 20, in run
    self.build()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install_lib.py", line 111, in build
    self.run_command('build_ext')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 251, in run
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 278, in run
RuntimeError: autoconf error

Why there's no password management?

First of all, this tool is awesome! Thank you very much! It's a life saver.

But I couldn't help myself wondering why there's no password management. Remembering all passwords from different connections is a pain and I think it could help a lot if storm could store them.

I don't know if Windows and Linux have a password management program, but Mac has the Keychain where all passwords, certificates, etc are stored. You could use one of these tools to persist the user's passwords.

Simplifiy positional arguments

I always mix up the last three parts " " of storm's add and modify subcommands. I do not see an obvious order to them, besides that this is the order in which they appear in the ~/.ssh/config file. strom list uses an notation like <user>@<host>:<port>, wouldn't that be a usable pattern for add and modify, too? Another possible simplification would be to make the <name> argument optional and have implicit names in that case, thus reducing the problem to two positional arguments. For example, names could follow the pattern <user>@<host>:<port> thus enabling fast selection using ssh's autocomplete.

Error upgrading storm

I got this error while trying to upgrade storm:

(pathpy)lowks@robot-ng:~/src/python/linote_upstream> sudo pip install --upgrade storm
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 808, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 761, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/lowks/virtualenv/pathpy/lib/python2.7/site-packages/pip/index.py", line 382, in _get_queued_page
    page = self._get_page(location, req)
  File "/home/lowks/virtualenv/pathpy/lib/python2.7/site-packages/pip/index.py", line 551, in _get_page
    return HTMLPage.get_page(link, req, cache=self.cache)
  File "/home/lowks/virtualenv/pathpy/lib/python2.7/site-packages/pip/index.py", line 668, in get_page
    resp = urlopen(url)
  File "/home/lowks/virtualenv/pathpy/lib/python2.7/site-packages/pip/download.py", line 176, in __call__
    response = self.get_opener(scheme=scheme).open(url)
  File "/usr/lib64/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/home/lowks/virtualenv/pathpy/lib/python2.7/site-packages/pip/download.py", line 155, in https_open
    return self.do_open(self.specialized_conn_class, req)
  File "/usr/lib64/python2.7/urllib2.py", line 1181, in do_open
    h.request(req.get_method(), req.get_selector(), req.data, headers)
  File "/usr/lib64/python2.7/httplib.py", line 973, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.7/httplib.py", line 1007, in _send_request
    self.endheaders(body)
  File "/usr/lib64/python2.7/httplib.py", line 969, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python2.7/httplib.py", line 829, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.7/httplib.py", line 791, in send
    self.connect()
  File "/home/lowks/virtualenv/pathpy/lib/python2.7/site-packages/pip/download.py", line 139, in connect
    match_hostname(self.sock.getpeercert(), self.host)
  File "/home/lowks/virtualenv/pathpy/lib/python2.7/site-packages/pip/backwardcompat/ssl_match_hostname.py", line 61, in match_hostname
    % (hostname, ', '.join(map(repr, dnsnames))))
CertificateError: hostname u'storm.canonical.com' doesn't match either of 'blog.canonical.com', 'www.blog.canonical.com'

Something wrong in the backend ?

Feature request: A snapshot or backup

It would be nice to have a safety net before editing and realizing I am up the creek without a paddle via something like this:

storm backup

This will then create a backup of the ~/.ssh/config file which then will have a corresponding task:

storm restore

if anything was to go south during edit / delete.

Cant run storm on osx 10.9.3

I used #76 to install storm but when i'm trying to use it i get this error:

Traceback (most recent call last):
  File "/usr/local/bin/storm", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
    working_set.require(__requires__)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: six

License?

I didn't see a license for this project. What license is it using?

If there is a preference, I would vote for a BSD or MIT license.

error while run "storm add......" in Archlinux

OS:ArchLinux Python:3.4
I install stormssh by pip,but when I run storm add vps 162.243.132.118,error occurs:
Traceback (most recent call last): File "/usr/bin/storm", line 9, in <module> load_entry_point('stormssh==0.5.3', 'console_scripts', 'storm')() File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 351, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 2363, in load_entry_point return ep.load() File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 2088, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "/usr/lib/python3.4/site-packages/storm/__init__.py", line 62 print value ^ SyntaxError: invalid syntax

SSH Config differences

What are the differences between storm and ssh config file?

O Really liked the interactive mode!

Aliases

I use many management tools that can do basically the same things with their content. They use various terms for the equivalent actions:

  • manage more stuff: create/add/generate
  • describe managed stuff: show/info/status/display
  • alter managed stuff: modify/tamper/edit
  • manage less stuff: remove/delete/uninstall

For example the package managers APT and YUM both have a command to describe the contents of a package: apt-cache show python and yum info python. The version control systems Git and SVN both have command to get content from a distant repository: svn up and git pull. To avoid the user having to remember the right synonym for each management program, some of them allow to define aliases for subcommands. The version Git allows for aliases and so does YUM. These usually get stored in a config file under /etc/<tool_name>/config or ~/.config/<tool_name>/config.

To manage aliases and other configuration, Storm could have a subcommand. E.g. adding/edting an entry to the alias section of the config file could look like this:

$ storm config alias.remove=delete
Success! Alias "delete" for subcommand remove added.

Showing an alias could look like this:

$ storm config alias.remove
remove=delete

ImportError: cannot import name proxy_re

I've installed storm via pip and I get the above error when I try running it.

I've checked and paramiko is installed as part of dist-packages

I'm using:
Ubuntu 12.10
Python 2.7.3

Thanks,

Implicit hostnames

I thought I can just enter the connection name twice, thereby making it the name and parsing the connection parameters from the pattern, but it does not work like this:

$ storm add bengt@Bengt-Laptop:22 bengt@Bengt-Laptop:22
success  bengt@Bengt-Laptop:22 added to your ssh config. you can connect it by typing "ssh bengt@Bengt-Laptop:22".
$ cat ~/.ssh/config
[...]
Host bengt@Bengt-Laptop:22
    hostname Bengt-Laptop
    user bengt
    port 22
$ ssh bengt@Bengt-Laptop:22
ssh: Could not resolve hostname Bengt-Laptop:22: Name or service not known

First of all, storm should not allow me to use a connection name with an @ in it, because obviously SSH prefers parsing username and hostname from the command line as soon as there is an @ in it. It then only parses the hostname and username but not the port from a pattern:

$ ssh
usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
           ...
          [user@]hostname

It might though be useful to have connections that differ in the port, only. For example one could have a host that acts as a proxy and forwards ssh connections based on the port. Think having multiple machines in your home network behind a IPv4 NAT.

I propose underscores (_) as a replacement for the at sign (@) in connection names. This might lead to clashes, though. The URI bengt@Bengt-Laptop:22 would translate to the connection name bengt_Bengt-Laptop:22 and bengt_Bengt@Laptop would do so, too. That is the very reason why the at sign was introduced to to separate usernames and hostnames, so I think there is not much to be done about these clashes in principle.

One could avoid usernames with underscores, but there is no way to enforce this. As a preventive measure, storm could warn the user about possibly clashing user and hostnames and use underscores or minuses depending on their use in the URI. E.g. if there is a minus in the hostname (e.g.bengt@Bengt-Laptop:22), encode the at sign with an underscore (eg. bengt_Bengt-Laptop:22), if there is an underscore in the hostname (e.g. bengt@Bengt_Laptop), encode the at sign with a minus (e.g. bengt-Bengt_Laptop).

ssh_config module python

ssh_config module does not work for me, Help plz

python

Python 2.7.5 (default, Mar 9 2014, 22:15:05)

[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

from storm import ssh_config

Traceback (most recent call last):

File "", line 1, in

ImportError: cannot import name ssh_config

import storm

help(storm)

Feature request: import entries from running EC2 instances

It will be nice to import connections for all (or subset) of running EC2 instances:

  • name of entry could be some tag defined on the instance
  • private key could be identified by key pair name defined on the instance

I have small script for this which generates ssh config file in that way, it uses AWS CLI tool and AWS credential file, but your projects looks much sophisticated.

Pip Setup Error

When I run the setup via pip, I get these errors below:

System properties:

  • MacOSX 10.9.2
  • Python: 2.7.5

Cleaning up...
  Removing temporary dir /private/tmp/pip_build_root...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gKd1Q5-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/pycrypto
Exception information:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/commands/install.py", line 279, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/req.py", line 1380, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/req.py", line 699, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/Library/Python/2.7/site-packages/pip-1.5.2-py2.7.egg/pip/util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gKd1Q5-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/pycrypto

Python 3 support

Version: 0.5
Python: 3.3.2

storm list
Traceback (most recent call last):
  File "/usr/bin/storm", line 9, in <module>
    load_entry_point('stormssh==0.5', 'console_scripts', 'storm')()
  File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 357, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 2394, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 2108, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python3.3/site-packages/storm/__init__.py", line 3, in <module>
    from ssh_config import ConfigParser
ImportError: No module named 'ssh_config'

OSX CLANG Hard Error

Hi,

Installing with pip on OS X 10.9.2 abends with the following error:


creating build/temp.macosx-10.9-intel-2.7/src

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -Wall -Wstrict-prototypes -Wshorten-64-to-32 -fwrapv -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD2.c -o build/temp.macosx-10.9-intel-2.7/src/MD2.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

Add descriptions to servers

really cool utility !...

I have a bunch of connections on my sshconfig file.

could be possible to manage comments for entries ? for example

storm add -c "prod http" wonka [email protected]:10022

storm list
prod http => wonka -> [email protected]:10022

.ssh/sshconfig

storm: prod http

Host wonka
Hosname 1.2.3.4
.....

what do you think ?
may be could be cool to sort comments to have a list like this:

dev http1 => ...
prod http1 => ....
prod http2 => ....
stage http1 => ...
stage http2 => ...
....

chers

Error when using optional arguments

Not storm specific but affects its usage. This happened to me after upgrading.

$ storm add --id_file test test.com
Traceback (most recent call last):
  File "/usr/local/bin/storm", line 8, in <module>
    load_entry_point('stormssh==0.6.1', 'console_scripts', 'storm')()
  File "/Library/Python/2.7/site-packages/storm/kommandr.py", line 188, in __call__
    self.execute(sys.argv[1:])
  File "/Library/Python/2.7/site-packages/storm/kommandr.py", line 179, in execute
    arg_map = self.parser.parse_args(arg_list).__dict__
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1688, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1720, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1908, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1885, in consume_positionals
    take_action(action, args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1794, in take_action
    action(self, namespace, argument_values, option_string)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1090, in __call__
    namespace, arg_strings = parser.parse_known_args(arg_strings, namespace)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1720, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1926, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1866, in consume_optional
    take_action(action, args, option_string)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1794, in take_action
    action(self, namespace, argument_values, option_string)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 928, in __call__
    items.append(values)
AttributeError: 'str' object has no attribute 'append'

Whereas not using optional arguments does not throwout the same error:

$ storm add google google.com
success  google added to your ssh config. you can connect it by typing "ssh google".

I can look into this too but I just thought it should be documented.

Missing import "re"

With latest version from pip (0.6.1) I get this error:

% storm list
Traceback (most recent call last):
  File "/usr/local/bin/storm", line 9, in <module>
    load_entry_point('stormssh==0.6.1', 'console_scripts', 'storm')()
  File "/Library/Python/2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 345, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Library/Python/2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 2381, in load_entry_point
    return ep.load()
  File "/Library/Python/2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 2087, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/Library/Python/2.7/site-packages/storm/__main__.py", line 22, in <module>
    storm_ = Storm()
  File "/Library/Python/2.7/site-packages/storm/__init__.py", line 19, in __init__
    self.ssh_config.load()
  File "/Library/Python/2.7/site-packages/storm/ssh_config.py", line 110, in load
    config.parse(fd)
  File "/Library/Python/2.7/site-packages/storm/ssh_config.py", line 51, in parse
    proxy_re = re.compile(r"^(proxycommand)\s*=*\s*(.*)", re.I)
NameError: global name 're' is not defined

My ssh_config is not that complicated but it has many ProxyCommand options which somehow make this happen.

add --version argument to storm command line

What should happen:

lowks@lowkster:~> storm --version
0.6

What is happening:

lowks@lowkster:~> storm --version
usage: storm [-h] COMMAND ...
storm: error: too few arguments

The easiest way now to get the version is:

lowks@lowkster:~> python -c 'import storm; print storm.__version__'
0.6

Abilitiy to add arbitrary options

SSH has a large collection of options that can be added to a host. See man ssh_config for a list.

It would be nice if when editing we could add and edit arbitrary options. As an example:

# Host *.dev.example.com
# IdentityFile /home/bob/.ssh/dev_id_rsa
# StrictHostKeyChecking no
# UserKnownHostsFile /dev/null

storm add '*.dev.example.com' -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null" -o "IdentityFile=/home/bob/.ssh/dev_id_rsa"

This would would also allow --id_file to be deprecated and instead use a standard format for adding options.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.