{ "info": { "author": "Doh Simpson", "author_email": "mydohsimpson@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "# RabbitHole\n\n![rabbit](https://raw.githubusercontent.com/dohsimpson/rabbithole/master/alice.jpg)\n\n> Alice started to her feet, for it flashed across her mind that she had never before seen a rabbit with either a waistcoat-pocket, or a watch to take out of it, and burning with curiosity, she ran across the field after it, and was just in time to see it pop down a large rabbit-hole under the hedge.\n\n## Who is this for?\n\nFor anyone who uses SSH Tunnel (forward and reverse), HTTP/HTTPS proxy, or needs a remote directory mounted via SSH.\n\n## Features\n\n* A simple way to think about SSH tunnels\n* Simple YAML syntax to define SSH tunnels\n* Support Both Forward and Reverse tunnels\n* Support key based and password authentication\n* Support defining SSH-based Proxy\n* Support mounting SSH directories\n* Persistent tunnels. Broken connections are automatically recovered\n\n## Installation\n\n* `pip install RabbitHole-SSH`\n* (Optional) To use password authentication feature, install [`sshpass`](https://linux.die.net/man/1/sshpass)\n* (Optional) To use SSHFS mount feature, install [`sshfs`](https://github.com/libfuse/sshfs)\n\n## Quick Start\n\n1. Create a file `rabbithole.yaml` under your current directory, and paste in the following snippet, replacing HOSTNAME with the ip or hostname of an SSH server, change other attributes accordingly:\n\n```yaml\nnode:\n - name: myserver\n hostname: HOSTNAME\n port: 22\n user: root\n verifyhost: false\n\n - name: local\n hostname: localhost\n\nmap:\n - from: 2222\n to: myserver:22\n```\n\n2. Run command `rabbithole`.\n\nNow you have a tunnel to myserver:22 from localhost:2222. Test your access with `ssh -p 2222 root@localhost`.\n\nSee more examples in [Examples](#examples) section.\n\n# Documentation\n\n### Syntax Definition\n\n```yaml\nnode:\n - name: NAME # an identifier for a SSH host\n hostname: HOSTNAME # ip or hostname for the SSH server\n port: PORT # (Optional) a port number, default to 22\n key: PATH # (Optional) specify the private key to use\n password: PASSWORD # (Optional) password to use for the connection\n user: USERNAME # (Optional) username to use, default to \"root\"\n verifyhost: BOOL # (Optional) whether or not to verify SSH host when connecting, default to true\n ssh_options: [OPT=VAL,...] # (Optional) Additional SSH options when connecting\n\nmap:\n - from: NODE_NAME:PORT # This is the entry point of the tunnel, NODE_NAME default to localhost if omitted, PORT is required\n to: NODE_NAME:PORT # This is the exit of the tunnel, NODE_NAME default to localhost if omitted, PORT is required\n bind: IP # (Optional) which ip to bind the tunnel to. IP default to 'localhost'. Use 'all' to bind to all interfaces.\n\nproxy:\n - from: PORT # This is the entry point of the proxy\n to: NODE_NAME # This is the proxy SSH node\n bind: IP # (Optional) which ip to bind the proxy to. IP default to 'localhost'. Use 'all' to bind to all interfaces.\n\nmount:\n - from: PATH # This is the entry point of the SSHFS mount\n to: NODE_NAME:PATH # This is the exit of the SSHFS mount, PATH default to home directory if omitted, NODE_NAME is required\n mkdir: BOOL # (Optional) Whether to create the mount point if does not exist, default to false\n```\n\n### Configuration File\n\nThe YAML configuration file for RabbitHole need to be placed under current directory, `~/rabbithole.yaml`, or `/etc/rabbithole.yaml`. Files are tried in that order and the first one is used.\n\n## Examples\n\n* Node Definition\n\n```yaml\nnode:\n - name: server1\n hostname: server1\n\n - name: password_only_server\n hostname: password.example.org\n password: \"notmypassword!\"\n user: user\n\n - name: an_aws_server\n hostname: 123.123.123.123\n key: ~/.ssh/ec2_key.pem\n user: ec2-user\n verifyhost: no\n\n - name: hidden_ssh_server\n hostname: not22.example.org\n port: 2222\n```\n\n* A Forward Tunnel\n\n```yaml\nmap:\n # localhost:1234 tunneled to myserver:22\n - from: 1234 # NODE_NAME default to localhost\n to: myserver:22\n\n # localhost:8080 tunneled to nginx:80\n - from: localhost:8080\n to: nginx:80\n```\n\n* A Reverse Tunnel\n\n```yaml\nmap:\n # SSH access bypassing a firewall\n - from: myserver:2222\n to: 22 # NODE_NAME default to localhost\n\n # exposing a test server to the world\n - from: www_server:80\n to: localhost:8080\n```\n\n* SOCKS5 Proxy\n\n```yaml\nproxy:\n - from: 9000\n to: uk_server\n bind: all # open port 9000 to all interfaces\n\n - from: 9001\n to: us_server\n # default bind to localhost\n\n# Test the proxy: `export http_proxy=socks5://localhost:9000/ https_proxy=socks5://localhost:9000/; curl https://ipinfo.io`\n```\n\n* SSHFS Mount\n\n```yaml\nmount:\n - from: /mnt/server1_home\n to: server1 # PATH default to home directory\n\n - from: /mnt/server2_root\n to: server2:/\n mkdir: true # create /mnt/server2_root directory if it does not exist\n```\n\n## TODO\n\n* Add support for forward tunnel through an intermediate host\n* Add init script to run at startup\n* Add verbose mode to print useful debug messages\n* Anything else that makes sense ;)\n\n## Bugs or Feature requests\n\nFinding bugs and fix them, that is how software evolves. I need your help to make this software better for everyone. Feel free to open an issue or pull request and I will review it and respond.\n\nA good software should be intuitive. I consider anything that is unintuitive about RabbitHole to be a bug too.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dohsimpson/RabbitHole", "keywords": "", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "RabbitHole-SSH", "package_url": "https://pypi.org/project/RabbitHole-SSH/", "platform": "", "project_url": "https://pypi.org/project/RabbitHole-SSH/", "project_urls": { "Homepage": "https://github.com/dohsimpson/RabbitHole" }, "release_url": "https://pypi.org/project/RabbitHole-SSH/0.1.2/", "requires_dist": [ "pyyaml" ], "requires_python": ">=2.6", "summary": "YAML defined SSH Tunnel, SOCKS5 Proxy and SSHFS Mount", "version": "0.1.2" }, "last_serial": 4455151, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "eea9ee335bbf2161db4d11f7e3cc3037", "sha256": "0dfbe337ac765a557f639645e4cd33c590c2efad62c33e9519134e51c5bf2f0e" }, "downloads": -1, "filename": "RabbitHole_SSH-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "eea9ee335bbf2161db4d11f7e3cc3037", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 20512, "upload_time": "2018-11-02T23:05:31", "url": "https://files.pythonhosted.org/packages/49/bf/8a14591af0dca0fa94aec86f750d1f6cb7817f39e6d5ef96fdcf10143dd6/RabbitHole_SSH-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8d0756e950674d9c4969a90a63cee9f5", "sha256": "3eddfcdefb89b08aee8c28d2a3b545024778572ae363fa9a98806d85a6757f19" }, "downloads": -1, "filename": "RabbitHole-SSH-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8d0756e950674d9c4969a90a63cee9f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23226, "upload_time": "2018-11-02T23:05:32", "url": "https://files.pythonhosted.org/packages/6b/e1/2edd89b37c92ab1d02f22f5738ee7a903122280fcae64f2c527e0da3dd54/RabbitHole-SSH-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "6f3e2bfe93ec7ca3a84bb95937b4b6b1", "sha256": "76cfc8f7b56de857759f6a0746a8d802a5060042ed3d8ece93bac65a454c725f" }, "downloads": -1, "filename": "RabbitHole_SSH-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6f3e2bfe93ec7ca3a84bb95937b4b6b1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 20513, "upload_time": "2018-11-02T23:13:12", "url": "https://files.pythonhosted.org/packages/7f/04/628097ab263b9464fbd45cec73dd514ce333376eba05a7993be9e30b3e9b/RabbitHole_SSH-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "843351bb7c4fc83cccf77416af48e23a", "sha256": "6260a293866960de4d1df7cea1d1379ee88bf2ebe08eb7808f4d0d724ccc1dbd" }, "downloads": -1, "filename": "RabbitHole-SSH-0.1.1.tar.gz", "has_sig": false, "md5_digest": "843351bb7c4fc83cccf77416af48e23a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23237, "upload_time": "2018-11-02T23:13:13", "url": "https://files.pythonhosted.org/packages/1f/1e/cf3b9ef9f39025008218552a259881dc09df8821b18cbd3e91c13c715e3c/RabbitHole-SSH-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "3e6afffd62a00de38ad3e863065d7c3f", "sha256": "ab7cfa6d7a01590785878c7d53a5f92ca6c89bb641ad4891df17d1bdf4359569" }, "downloads": -1, "filename": "RabbitHole_SSH-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3e6afffd62a00de38ad3e863065d7c3f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6", "size": 8396, "upload_time": "2018-11-05T23:11:32", "url": "https://files.pythonhosted.org/packages/29/54/cb2ea7e446779f01e10e0159a661991ef4e515cf317bd844d5158d597274/RabbitHole_SSH-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f28aa8cae727593959914a559c1b048", "sha256": "fb5e07abb954e44cb29dd46229ebf0e8943dbb830ffbd91efc53cab13257d397" }, "downloads": -1, "filename": "RabbitHole-SSH-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6f28aa8cae727593959914a559c1b048", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6", "size": 21241, "upload_time": "2018-11-05T23:11:33", "url": "https://files.pythonhosted.org/packages/4c/2a/8e5137e5e5e7e30fea27dead6155e9bcac02a0532683b777890cdac3d9e8/RabbitHole-SSH-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3e6afffd62a00de38ad3e863065d7c3f", "sha256": "ab7cfa6d7a01590785878c7d53a5f92ca6c89bb641ad4891df17d1bdf4359569" }, "downloads": -1, "filename": "RabbitHole_SSH-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3e6afffd62a00de38ad3e863065d7c3f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6", "size": 8396, "upload_time": "2018-11-05T23:11:32", "url": "https://files.pythonhosted.org/packages/29/54/cb2ea7e446779f01e10e0159a661991ef4e515cf317bd844d5158d597274/RabbitHole_SSH-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f28aa8cae727593959914a559c1b048", "sha256": "fb5e07abb954e44cb29dd46229ebf0e8943dbb830ffbd91efc53cab13257d397" }, "downloads": -1, "filename": "RabbitHole-SSH-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6f28aa8cae727593959914a559c1b048", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6", "size": 21241, "upload_time": "2018-11-05T23:11:33", "url": "https://files.pythonhosted.org/packages/4c/2a/8e5137e5e5e7e30fea27dead6155e9bcac02a0532683b777890cdac3d9e8/RabbitHole-SSH-0.1.2.tar.gz" } ] }