{ "info": { "author": "Lou Ahola", "author_email": "lou@hashchain.ca", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# smsh\nA command line utility enabling SSH-like interactive sessions and continuous output for long running commands via the AWS SSM API.\nThe tool provides continuous output from the SendCommand operation, despite the output not being available via the AWS API.\n\n## installing\nCurrently, `smsh` is only distributed as source. Clone this repository and then bulid it with setuptools:\n\n```\npython setup.py install\n```\n\n## interactive usage\n`smsh` allows you to enter an interactive shell session by just providing the instance-id or IP address:\n\n```\nsmsh i-123450asdf12345\n```\n\nOnce \"connected\", the user is then given an input prompt, similar to a shell prompt:\n\n```\n[root@demo-instance root]#\n```\n\nThe instance name will get set to the \"Name\" tag of the instance, or will default to the instance-id if no Name is set.\nThe user can then interact with the session like it was a remote shell:\n\n```\n[root@demo-instance root]# ls -al\ntotal 40\ndr-xr-x--- 3 root root 4096 Mar 15 21:47 .\ndr-xr-xr-x 25 root root 4096 Mar 15 18:44 ..\n-rw-r--r-- 1 root root 18 Jan 15 2011 .bash_logout\n-rw-r--r-- 1 root root 176 Jan 15 2011 .bash_profile\n-rw-r--r-- 1 root root 176 Jan 15 2011 .bashrc\n-rw-r--r-- 1 root root 100 Jan 15 2011 .cshrc\ndrwx------ 2 root root 4096 Mar 14 21:53 .ssh\n-rw-r--r-- 1 root root 129 Jan 15 2011 .tcshrc\n[root@demo-instance root]#\n```\n\n## ephemeral usage\n`smsh` also allows for single remote commands to be executed. This can be run by providing the `-c` flag:\n\n```\nsmsh i-123450asdf12345 -c 'ls -al'\n```\n\nThe output will be printed directly to the console.\n\n## output\nThis tool supports unbuffered output mode (still technically buffered), where users can get constant real time\noutput for long-running commands, despite the output not being available via the AWS API.\nThis is a large limitation of SSM. By default, all `smsh` output is unbuffered. This\ncan lead to performance issues though, as the client will be constantly polling the instance for the latest output.\n\nClients can run in buffered mode by adding the argument, `--buffered-output`.\n\nBecause there is near real-time output, long running commands become much more usable. Additionally, things like `tail -f`\nare natively supported.\n\n```\n[root@demo-instance root]# tail -f my.log\nlong running process Thu Mar 15 21:51:02 UTC 2018!!!!\nlong running process Thu Mar 15 21:51:03 UTC 2018!!!!\nlong running process Thu Mar 15 21:51:04 UTC 2018!!!!\nlong running process Thu Mar 15 21:51:05 UTC 2018!!!!\nlong running process Thu Mar 15 21:51:06 UTC 2018!!!!\nlong running process Thu Mar 15 21:51:07 UTC 2018!!!!\nlong running process Thu Mar 15 21:51:08 UTC 2018!!!!\nlong running process Thu Mar 15 21:51:09 UTC 2018!!!!\nlong running process Thu Mar 15 21:51:10 UTC 2018!!!!\nlong running process Thu Mar 15 21:51:11 UTC 2018!!!!\n\n```\n\n## state\nIn interactive mode, the session state is maintained throughout the session. This includes the current working directory, the current environment\nvariables (both local and exported), and the current user.\n\n```\nroot@demo-instance root]# pwd\n/root\n[root@demo-instance root]# cd /var/log\n[root@demo-instance log]# pwd\n/var/log\n[root@demo-instance log]#\n```\n\n## canceling a command\nIn interactive mode, CTRL+C will cancel any command with the SSM API, and as such SIGTERM should be sent to the executing command\non the target managed instance. Additionally, sending a SIGTERM to `smsh` in either interactive or ephemeral mode should likewise result\nin the SIGTERM being sent to the instance.\n\n## editor\nThis tool also allows for local Vi/Nano editors to be used. Just like when normally using them on a remote machine,\nthey can open up existing or new files. However, because of the nature of the program, any new files that are opened\nin an editor and saved without any content are discarded.\n\n```\n[root@demo-instance log]# vi somefile.txt\n```\n\n\n## considerations\nThe following are some considerations for using this tool:\n\n* This tool polls. If there are many users in an account,\n or if there are many commands being executed, API calls\n could be throttled. This tool attempts to do exponential backoff\n to try to avoid this situation.\n* DescribeCommandInvocation does not support tag based permissions. So,\n while you can control the SendCommand based on tag,\n anyone will effectively be able to see the output of every command.\n* SSM limits the script size that can be sent via the SendCommand\n action. This size limit can impact the Editor usage, when editing\n very large files.\n* Output buffering. Even the unbuffered mode buffers up to 100 lines at a time.\n If the output is happening faster than that, the command can get backed up.\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": "http://github.com/node40/smsh", "keywords": "", "license": "GNU General Public License v3.0", "maintainer": "", "maintainer_email": "", "name": "smsh", "package_url": "https://pypi.org/project/smsh/", "platform": "", "project_url": "https://pypi.org/project/smsh/", "project_urls": { "Homepage": "http://github.com/node40/smsh" }, "release_url": "https://pypi.org/project/smsh/0.0.11/", "requires_dist": [ "argparse", "boto3" ], "requires_python": "", "summary": "SSH-like Shell via AWS SSM", "version": "0.0.11" }, "last_serial": 3987575, "releases": { "0.0.10": [ { "comment_text": "", "digests": { "md5": "4aeaf737d2585227f9a1e99f4fcdb332", "sha256": "35aef8e4aa762a6898fdb3bfc0fd7aeecf4dcf558aa62efb135bfa51ffc6d263" }, "downloads": -1, "filename": "smsh-0.0.10-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4aeaf737d2585227f9a1e99f4fcdb332", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22579, "upload_time": "2018-04-18T14:21:21", "url": "https://files.pythonhosted.org/packages/9b/c4/8672d5d0029661820433fd6c345b405273e85f0f9212ddec5633db7f1ad0/smsh-0.0.10-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4a54e6a59820ee64dd9285e4737e3162", "sha256": "5e632c196e96b7e794c1b7af92e2886f8e130d463283df16857fb96a70bb9c16" }, "downloads": -1, "filename": "smsh-0.0.10.tar.gz", "has_sig": false, "md5_digest": "4a54e6a59820ee64dd9285e4737e3162", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11207, "upload_time": "2018-04-18T14:21:22", "url": "https://files.pythonhosted.org/packages/c9/2e/745aca0213d3367e6200ae63723a7f95f8010aae24d563e7b2d02abbce68/smsh-0.0.10.tar.gz" } ], "0.0.11": [ { "comment_text": "", "digests": { "md5": "0f74942a9111eea354307bc488058336", "sha256": "4d537da9b901eb05adf067517394b5c0f05c8aed5760b4fccee0f73c33c8f751" }, "downloads": -1, "filename": "smsh-0.0.11-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0f74942a9111eea354307bc488058336", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22641, "upload_time": "2018-06-22T02:15:18", "url": "https://files.pythonhosted.org/packages/17/87/8f470a9cf403bd90f32d7e787a28ebb5d6b8a5dec56e9b6c6d100e4eb099/smsh-0.0.11-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6c33b6a34a563361dd9701a4bbc7d4aa", "sha256": "18dde48476a66dad947e415684d011466d94a049ceb787dfc05c2f6808f0fe1a" }, "downloads": -1, "filename": "smsh-0.0.11.tar.gz", "has_sig": false, "md5_digest": "6c33b6a34a563361dd9701a4bbc7d4aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11262, "upload_time": "2018-06-22T02:15:19", "url": "https://files.pythonhosted.org/packages/b1/7c/3a1f280d5b911c961bd6dac5983cab37fbba3220f551d7169b914c1578c5/smsh-0.0.11.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "b7bc9524dc90879ff41f928e467c16bd", "sha256": "6a1a898de4c0eb71dcf20fc205e38bc1d58052dfb666da1b8ce189b896e17450" }, "downloads": -1, "filename": "smsh-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b7bc9524dc90879ff41f928e467c16bd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 32470, "upload_time": "2018-04-06T15:13:30", "url": "https://files.pythonhosted.org/packages/c0/e2/eb2dd8c46b66236234499a5ada42b86653cc9390ee5d36095e5ca5ece25f/smsh-0.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "125524833ae3923465430d6fd0d42218", "sha256": "5dd644d01f040316aa34c47b3a1ab8046ff267ad8422f1e4824a58a1dfb91993" }, "downloads": -1, "filename": "smsh-0.0.6.tar.gz", "has_sig": false, "md5_digest": "125524833ae3923465430d6fd0d42218", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24939, "upload_time": "2018-04-06T15:13:31", "url": "https://files.pythonhosted.org/packages/ac/39/9ed047c8df99927bb1c503e72d82f61bad5e875745259315da3e788bc423/smsh-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "b3f60995b1511e0138075dd24bffd88e", "sha256": "e6e049311418405a696dea15557bdebc718895f26db7ec734c3ab4ce39f383e2" }, "downloads": -1, "filename": "smsh-0.0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b3f60995b1511e0138075dd24bffd88e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 32473, "upload_time": "2018-04-06T15:36:59", "url": "https://files.pythonhosted.org/packages/10/9a/cbe292fa02cc9bbec7e5e910a70f6533e58635835bb39bac35c5b3a7c634/smsh-0.0.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5ff8ba782740a98b4e8f8d3266393b3b", "sha256": "7bacacbca75be81b354efe97f2770fc03c2695705468286d0eb9589a563be4b2" }, "downloads": -1, "filename": "smsh-0.0.7.tar.gz", "has_sig": false, "md5_digest": "5ff8ba782740a98b4e8f8d3266393b3b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25001, "upload_time": "2018-04-06T15:37:00", "url": "https://files.pythonhosted.org/packages/54/34/3d76c3923fb1eab1ac174c77181913f4cccce2111eff5cc35d1dfc289e0e/smsh-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "d4879d021d51259e099a1aeaa00316c4", "sha256": "2c1aa7d507cbcd663331e19afb3daa90ed912f7ed52c587689e327add7362fef" }, "downloads": -1, "filename": "smsh-0.0.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d4879d021d51259e099a1aeaa00316c4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22426, "upload_time": "2018-04-12T19:26:44", "url": "https://files.pythonhosted.org/packages/38/93/2526a37e00dffc56986657472fbaf299a7697a7a6b3ae7652858b84ca6fa/smsh-0.0.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "763b9c30008890b7dd91b2ee5a9de535", "sha256": "c11a6cd59a07d18b2553fa001d050e7a006b825c828445a0a5724bc021aec5d2" }, "downloads": -1, "filename": "smsh-0.0.8.tar.gz", "has_sig": false, "md5_digest": "763b9c30008890b7dd91b2ee5a9de535", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10966, "upload_time": "2018-04-12T19:26:45", "url": "https://files.pythonhosted.org/packages/56/ec/f43436f78c961e2de2f2336d721130a23b00b1337183e9f7baff941aa1b6/smsh-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "d2cae5ab9d4a7c25f7045cb03bc28f62", "sha256": "2770a09595c1aea8eee0c88114e2c5835dc26154841c3a95786e93674c3cd788" }, "downloads": -1, "filename": "smsh-0.0.9-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d2cae5ab9d4a7c25f7045cb03bc28f62", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22374, "upload_time": "2018-04-16T13:41:55", "url": "https://files.pythonhosted.org/packages/65/ba/d0fd5e58a7aa146e7ce125b23920c6eed2cea2c02f4f84cc70972b4c21cc/smsh-0.0.9-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e5f2f93eba0f26c936051d1036876ff8", "sha256": "08f2118ca5f0b49d652d26dd5b6cdf6b703acb516637a09fc4a4552ec141aafd" }, "downloads": -1, "filename": "smsh-0.0.9.tar.gz", "has_sig": false, "md5_digest": "e5f2f93eba0f26c936051d1036876ff8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10984, "upload_time": "2018-04-16T13:41:56", "url": "https://files.pythonhosted.org/packages/b0/5d/7e8dc9e53dcfdcf8a4ed24933dcdfdc1043aa3f2b8b508d2fef6a8566e98/smsh-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0f74942a9111eea354307bc488058336", "sha256": "4d537da9b901eb05adf067517394b5c0f05c8aed5760b4fccee0f73c33c8f751" }, "downloads": -1, "filename": "smsh-0.0.11-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0f74942a9111eea354307bc488058336", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22641, "upload_time": "2018-06-22T02:15:18", "url": "https://files.pythonhosted.org/packages/17/87/8f470a9cf403bd90f32d7e787a28ebb5d6b8a5dec56e9b6c6d100e4eb099/smsh-0.0.11-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6c33b6a34a563361dd9701a4bbc7d4aa", "sha256": "18dde48476a66dad947e415684d011466d94a049ceb787dfc05c2f6808f0fe1a" }, "downloads": -1, "filename": "smsh-0.0.11.tar.gz", "has_sig": false, "md5_digest": "6c33b6a34a563361dd9701a4bbc7d4aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11262, "upload_time": "2018-06-22T02:15:19", "url": "https://files.pythonhosted.org/packages/b1/7c/3a1f280d5b911c961bd6dac5983cab37fbba3220f551d7169b914c1578c5/smsh-0.0.11.tar.gz" } ] }