{ "info": { "author": "Amadeus IT Group", "author_email": "opensource@amadeus.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Quality Assurance", "Topic :: Software Development :: Testing", "Topic :: System", "Topic :: System :: Installation/Setup", "Topic :: System :: Shells", "Topic :: System :: Software Distribution", "Topic :: Terminals" ], "description": "=======\nJumpSSH\n=======\n\n.. image:: https://secure.travis-ci.org/AmadeusITGroup/JumpSSH.svg?branch=master\n :target: http://travis-ci.org/AmadeusITGroup/JumpSSH\n\n.. image:: https://coveralls.io/repos/AmadeusITGroup/JumpSSH/badge.svg?branch=master\n :target: https://coveralls.io/r/AmadeusITGroup/JumpSSH?branch=master\n\n.. image:: https://badge.fury.io/py/jumpssh.svg\n :target: https://badge.fury.io/py/jumpssh\n\n.. image:: https://readthedocs.org/projects/jumpssh/badge?version=latest\n :target: https://jumpssh.readthedocs.io?badge=latest\n\n.. image:: https://sonarcloud.io/api/project_badges/measure?project=amadeusitgroup_jumpssh&metric=bugs\n :target: https://sonarcloud.io/dashboard?id=amadeusitgroup_jumpssh\n\n.. image:: https://sonarcloud.io/api/project_badges/measure?project=amadeusitgroup_jumpssh&metric=vulnerabilities\n :target: https://sonarcloud.io/dashboard?id=amadeusitgroup_jumpssh\n\n\n:JumpSSH: Python module to run commands on remote servers\n:Copyright: Copyright (c) 2017 Amadeus sas\n:License: `MIT `_\n:Documentation: https://jumpssh.readthedocs.io\n:Development: https://github.com/AmadeusITGroup/JumpSSH\n\nWhat\n----\n`JumpSSH` is a module for Python 2.7+/3.4+ that can be used to run commands on remote servers through a gateway.\n\nIt is based on `paramiko library `_.\nIt provides the ability to execute commands on hosts that are not directly accessible but only through one or\nmore servers.\nScript does not need to be uploaded on a remote server and can be run locally.\n\nSeveral authentication methods are supported (password, ssh key).\n\nCommands can be run through several jump servers before reaching the remote server.\nNo need to establish a session for each command, a single ssh session can run as many command as you want,\nincluding parallel queries, and you will get result for each command independently.\n\nSo, why another python library to setup remote server through ssh ? Here is a quick comparison with the most known existing python libraries\n - Paramiko: provide very good implementation of SSHv2 protocol in python but with a low level api a bit complex\n - Ansible: require more configuration and understanding to start.\n Moreover, support of bastion host is done with modification of local ssh config to use ProxyCommand, and this is\n needed for each bastion host.\n - Fabric: use of jump server is much easier than Ansible thanks to 'env.gateway' parameter, but does not allow jump through several servers.\n\nInstallation\n------------\nTo install JumpSSH, simply:\n\n.. code:: bash\n\n $ pip install jumpssh\n\n\nExamples\n--------\nestablish ssh session with a remote host through a gateway:\n\n.. code:: python\n\n >>> from jumpssh import SSHSession\n\n # establish ssh connection between your local machine and the jump server\n >>> gateway_session = SSHSession('gateway.example.com',\n ... 'my_user', password='my_password').open()\n\n # from jump server, establish connection with a remote server\n >>> remote_session = gateway_session.get_remote_session('remote.example.com',\n ... password='my_password2')\n\n\nrun commands on remote host:\n\n.. code:: python\n\n # command will be executed remotely and output will be returned locally and printed\n >>> print(remote_session.get_cmd_output('ls -lta'))\n total 28\n drwxr-xr-x. 412 root root 12288 Mar 21 14:25 ..\n drwx------. 2 my_user my_user 28 Mar 6 19:25 .ssh\n drwx------. 3 my_user my_user 70 Mar 6 19:25 .\n -rw-r--r--. 1 my_user my_user 18 Jul 12 2016 .bash_logout\n -rw-r--r--. 1 my_user my_user 193 Jul 12 2016 .bash_profile\n -rw-r--r--. 1 my_user my_user 231 Jul 12 2016 .bashrc\n\n # get exit code of the remotely executed command (here to check if a package is installed)\n >>> remote_session.get_exit_code('yum list installed package_name')\n 0\n\nremote rest api usage:\n\n.. code:: python\n\n # calling rest api on remote host that is only accessible from the gateway\n >>> from jumpssh import RestSshClient\n >>> rest_client = RestSshClient(gateway_session)\n\n # syntax is similar to requests library (http://docs.python-requests.org)\n >>> http_response = rest_client.get('http://remote.example.com/helloworld')\n >>> http_response.status_code\n 200\n >>> http_response.text\n u'Hello, World!'\n\nremote files operations:\n\n.. code:: python\n\n # check if remote path exists\n >>> remote_session.exists('/path/to/a/file')\n True\n\n # copy file from local machine to remote host through gateway\n >>> remote_session.put('/local/path/to/a/file', '/remote/path/to/the/file')\n\n # create file on remote host from local content\n >>> remote_session.file('/remote/path/to/the/file',\n ... content='remote file content', permissions='600')\n\n # download remote file on local machine from remote host through gateway\n >>> remote_session.get('/remote/path/to/the/file', '/local/path/')\n\n\nTests\n-----\njumpssh tests require docker, check `docker documentation `_ for how to install it\ndepending on your OS.\nit also requires few python packages. To install them, run:\n\n.. code:: bash\n\n $ pip install -r requirements_dev.txt\n\nTo run the test suite, clone the repository and run:\n\n.. code:: bash\n\n $ python setup.py test\n\nor simply:\n\n.. code:: bash\n\n $ tox\n\n\nContributing\n------------\n\nBug Reports\n^^^^^^^^^^^\nBug reports are hugely important! Before you raise one, though,\nplease check through the `GitHub issues `_,\nboth open and closed, to confirm that the bug hasn't been reported before.\n\nFeature Requests\n^^^^^^^^^^^^^^^^\nIf you think a feature is missing and could be useful in this module, feel free to raise a feature request through the\n`GitHub issues `_\n\nCode Contributions\n^^^^^^^^^^^^^^^^^^\nWhen contributing code, please follow `this project-agnostic contribution guide `_.", "description_content_type": "", "docs_url": null, "download_url": "https://pypi.python.org/pypi/jumpssh", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/AmadeusITGroup/JumpSSH", "keywords": "", "license": "MIT license", "maintainer": "Thibaud Castaing", "maintainer_email": "t-cas@users.noreply.github.com", "name": "jumpssh", "package_url": "https://pypi.org/project/jumpssh/", "platform": "Unix; MacOS X", "project_url": "https://pypi.org/project/jumpssh/", "project_urls": { "Download": "https://pypi.python.org/pypi/jumpssh", "Homepage": "https://github.com/AmadeusITGroup/JumpSSH" }, "release_url": "https://pypi.org/project/jumpssh/1.6.1/", "requires_dist": null, "requires_python": "", "summary": "Python library for remote ssh calls through a gateway.", "version": "1.6.1" }, "last_serial": 5114248, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "ac133e0ee32e3aef653f4ca98239976e", "sha256": "17e39f0804a9d1823e22ea5044c89c22cde3b0617c7fcb9a6c90a752401437c0" }, "downloads": -1, "filename": "jumpssh-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ac133e0ee32e3aef653f4ca98239976e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12729, "upload_time": "2017-05-24T17:19:03", "url": "https://files.pythonhosted.org/packages/43/cf/a649f029f0953b6e9b4937764a4e3997c45b10e966fbd53fa40b36e20ae3/jumpssh-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "e47d75f618a8aed927f5abd0e3385db0", "sha256": "068d8d8f11645c6881273ea607ff52ba919b1e89f619851098af2830ca2d6777" }, "downloads": -1, "filename": "jumpssh-1.0.1.tar.gz", "has_sig": false, "md5_digest": "e47d75f618a8aed927f5abd0e3385db0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12667, "upload_time": "2017-06-11T19:34:22", "url": "https://files.pythonhosted.org/packages/83/ee/c2c7a8cd5254b5ae74f262f24913f53582925460e07f919018ecd3cd50f7/jumpssh-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "ec6d90711e031cf6d2e29f3b4187051d", "sha256": "d1eb641a466bba31dd1a760e872d696779a9278a6e3a344c8aff0c459dac98b9" }, "downloads": -1, "filename": "jumpssh-1.0.2.tar.gz", "has_sig": false, "md5_digest": "ec6d90711e031cf6d2e29f3b4187051d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15092, "upload_time": "2017-07-14T21:40:50", "url": "https://files.pythonhosted.org/packages/6e/52/86b181e9ee061e29208bd55be9fa132e1b9509af7a16317395f9203da069/jumpssh-1.0.2.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "33fa8c657b3e43b33f3b10f4596315fe", "sha256": "4d94c06d6b0d4b364ad200ab3e890acbc1ea6c78a2429461bad8fe4c15866fe7" }, "downloads": -1, "filename": "jumpssh-1.1.0.tar.gz", "has_sig": false, "md5_digest": "33fa8c657b3e43b33f3b10f4596315fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15209, "upload_time": "2017-07-20T19:52:54", "url": "https://files.pythonhosted.org/packages/49/43/ab8f7b7a041af356a37560e596db355d52e4b98334c711f2f50394f02c1f/jumpssh-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "e77c61c6d6f7040bd5c52f1a8985a3d1", "sha256": "1607b70c4ba9c1480f3f9556f71d5ea504cf826d526fcab7041048eb6c51c8a0" }, "downloads": -1, "filename": "jumpssh-1.2.0.tar.gz", "has_sig": false, "md5_digest": "e77c61c6d6f7040bd5c52f1a8985a3d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15217, "upload_time": "2017-07-24T22:07:50", "url": "https://files.pythonhosted.org/packages/05/58/76d66815928f90a215d4f88c8515106eaa56289e9fa41a1e6da35bbf29f8/jumpssh-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "db9be6129459ac86f6d3d36e23a342ca", "sha256": "975af3940cf8c351e10f0778a8667900debeccb452464f198890f6afdd5986dd" }, "downloads": -1, "filename": "jumpssh-1.2.1.tar.gz", "has_sig": false, "md5_digest": "db9be6129459ac86f6d3d36e23a342ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15284, "upload_time": "2017-07-27T18:53:41", "url": "https://files.pythonhosted.org/packages/8d/65/0b1d6bef5b48b5d14a6520a11d1deae7635b80609b8140eb985fa34724c6/jumpssh-1.2.1.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "ee64b7c58fe92c45baaf5ce3b53afd9b", "sha256": "f0751f86b9e3ffb03d22e48dec1dde62449d765c9e58fecbe7b7d408d9c2961c" }, "downloads": -1, "filename": "jumpssh-1.3.0.tar.gz", "has_sig": false, "md5_digest": "ee64b7c58fe92c45baaf5ce3b53afd9b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17449, "upload_time": "2017-09-14T14:32:50", "url": "https://files.pythonhosted.org/packages/3b/3f/f44d449216420b11b8aa89e2b069aa7685ff828462e9054db2db7e928dbe/jumpssh-1.3.0.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "1db0bb033539d15a48f9243b83aac444", "sha256": "cfbd30c22c958d6ba07e2eb0b9b95ad5b5bcce8a5ebc356f68df449f986eaa57" }, "downloads": -1, "filename": "jumpssh-1.3.1.tar.gz", "has_sig": false, "md5_digest": "1db0bb033539d15a48f9243b83aac444", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17589, "upload_time": "2017-09-15T22:55:20", "url": "https://files.pythonhosted.org/packages/00/73/94ea5629c7d8c68762c0ce741b88c4565d7eeca367f8cc86a7d4b5bfe9cc/jumpssh-1.3.1.tar.gz" } ], "1.3.2": [ { "comment_text": "", "digests": { "md5": "7b4465d046e7047981b3fff81fc7b491", "sha256": "44c058ee41c238f4cae7e059e83c7aad904f0686898a997dd4c83886f5de3101" }, "downloads": -1, "filename": "jumpssh-1.3.2.tar.gz", "has_sig": false, "md5_digest": "7b4465d046e7047981b3fff81fc7b491", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15237, "upload_time": "2017-12-18T03:21:35", "url": "https://files.pythonhosted.org/packages/b8/04/5d6ac69470afdf7f72ba7613e225d2f08ff8f3dc87f49e8e217a6b4ae007/jumpssh-1.3.2.tar.gz" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "8b444265c44f50af1679004b6acd3ac5", "sha256": "8975794afc58714271f5117aa9a85cbf039dd03af6302899aa09c64e7d7161d1" }, "downloads": -1, "filename": "jumpssh-1.4.0.tar.gz", "has_sig": false, "md5_digest": "8b444265c44f50af1679004b6acd3ac5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15651, "upload_time": "2018-01-29T15:28:21", "url": "https://files.pythonhosted.org/packages/22/5f/a240d8cb05174856694e26c5ee74d3eb46443a3308967b1d8b7be0112ca3/jumpssh-1.4.0.tar.gz" } ], "1.4.1": [ { "comment_text": "", "digests": { "md5": "a556ddb1f346a9cddc6b8b1be0d95887", "sha256": "2249547a24a09f9701a90357d0c9551c2bfdbda9b9f0e8dd01779b5a0eecc342" }, "downloads": -1, "filename": "jumpssh-1.4.1.tar.gz", "has_sig": false, "md5_digest": "a556ddb1f346a9cddc6b8b1be0d95887", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15698, "upload_time": "2018-04-01T02:58:38", "url": "https://files.pythonhosted.org/packages/21/79/43045e1d8b17efc29c8b6d017a9ad10334be111cc1661d96766baddfd5f7/jumpssh-1.4.1.tar.gz" } ], "1.5.1": [ { "comment_text": "", "digests": { "md5": "da306ad6baa8fb49c10b8bb95c9ddaf2", "sha256": "5c01d72fcfa495e9a972b14ab6fc74ffd66b211a13bf3cb5ea9a223dcaccad1a" }, "downloads": -1, "filename": "jumpssh-1.5.1-py2-none-any.whl", "has_sig": false, "md5_digest": "da306ad6baa8fb49c10b8bb95c9ddaf2", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 20971, "upload_time": "2019-01-14T10:04:40", "url": "https://files.pythonhosted.org/packages/81/ee/9b45afc3cd52d810d333e8df2ca1ab0c55d18fa2fd813cd1f1fac985cea3/jumpssh-1.5.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6e06f895660cde52c02e5d2fa71c0ee8", "sha256": "ab516ed2b947fb8f755cb3b2c509be9e1a97756d32e044db5eed3c2d6c35ac3e" }, "downloads": -1, "filename": "jumpssh-1.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "6e06f895660cde52c02e5d2fa71c0ee8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17573, "upload_time": "2019-01-14T10:11:36", "url": "https://files.pythonhosted.org/packages/da/47/8c160d30e5ac66d45348db26065c901d6dadb06d9c18baa6c7adfc1e3f1b/jumpssh-1.5.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0edc18647cb9fec7a4cd43dfb7ccf551", "sha256": "0b66c02877803a0dbb4fcf76d30e83dc0d55880efedb685b47a50c506f331d21" }, "downloads": -1, "filename": "jumpssh-1.5.1.tar.gz", "has_sig": false, "md5_digest": "0edc18647cb9fec7a4cd43dfb7ccf551", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16159, "upload_time": "2019-01-14T10:04:42", "url": "https://files.pythonhosted.org/packages/27/80/11c560c233e59dc8423f3a32e9dc5d7f43477c8b9324c4461a7688f66f92/jumpssh-1.5.1.tar.gz" } ], "1.6.1": [ { "comment_text": "", "digests": { "md5": "b5e4af8e49164f2a65e61cfa06e27022", "sha256": "0a0d5a71004d049a725fd739d200f96198b64c9be69830f29cd271a055d36c28" }, "downloads": -1, "filename": "jumpssh-1.6.1.tar.gz", "has_sig": false, "md5_digest": "b5e4af8e49164f2a65e61cfa06e27022", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18625, "upload_time": "2019-04-08T15:33:14", "url": "https://files.pythonhosted.org/packages/17/5a/e6046f3605bc179ae4ab0f52b7a4ecaf22ef82d3efd6b79fe5a968603537/jumpssh-1.6.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b5e4af8e49164f2a65e61cfa06e27022", "sha256": "0a0d5a71004d049a725fd739d200f96198b64c9be69830f29cd271a055d36c28" }, "downloads": -1, "filename": "jumpssh-1.6.1.tar.gz", "has_sig": false, "md5_digest": "b5e4af8e49164f2a65e61cfa06e27022", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18625, "upload_time": "2019-04-08T15:33:14", "url": "https://files.pythonhosted.org/packages/17/5a/e6046f3605bc179ae4ab0f52b7a4ecaf22ef82d3efd6b79fe5a968603537/jumpssh-1.6.1.tar.gz" } ] }