autopass


Nameautopass JSON
Version 0.13 PyPI version JSON
download
home_page
SummaryEntering password automatically for sudo, ssh, scp
upload_time2023-11-08 07:14:32
maintainer
docs_urlNone
authorxinlin-z
requires_python>=3.8
licenseMIT License Copyright (c) 2023 xinlin-z for autopass Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Additional Information: https://github.com/xinlin-z/autopass https://cs.pynote.net
keywords password scp ssh sshpass sudo
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # autopass

* [Installation](#Installation)
* [Usage](#Usage)

Entering password automatically for sudo, ssh (remote command) and scp,
like sshpass. Autopass is a pure python version.
For ssh, a `yes` confirmation is also issued automatically
for you if necessary.

**No third party module is needed! No need pexpect!**

## Installation

```shell
$ pip install autopass
```

## Usage

``` shell
$ python -m autopass -p'passwd' sudo <command>
$ AUTOPASS='passwd' python -m autopass [-t<N>] ssh user@domain [-p port] <command>
```

`-p<passwd>`, specify the password.

`-t<N>`, specify a timeout in seconds. SIGKILL will be issued to
child process after timeout. No timeout by default.

Password will be issued only once, so if the password is not correct,
the child process will wait for a long time. This is your chance to
place a timeout. Other cases for using timeout might be facing the
terrible network. You can always place a relatively large timeout
value to keep you from waiting like forever.

Password can also be exported to `AUTOPASS` environment variable.

``` shell
$ export AUTOPASS='passwd'
$ python -m autopass <passwd-needed-command>
```

Autopass is focused on command execution, locally or remotely. It cannot
be used interactively. And please do not start a background process by
autopass, like `-f` option of ssh. It is an error. But you definitely
could run autopass with command as a whole in background (by `&`).

Exit code of the executed command is return by autopass, you can
use `echo $?` in your shell script to check if the command execution
is successful.


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "autopass",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "password,scp,ssh,sshpass,sudo",
    "author": "xinlin-z",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/74/0a/2846ecaaeff460782a9180467f4cd10c049c4785f6e04899999c8b2be9a6/autopass-0.13.tar.gz",
    "platform": null,
    "description": "# autopass\n\n* [Installation](#Installation)\n* [Usage](#Usage)\n\nEntering password automatically for sudo, ssh (remote command) and scp,\nlike sshpass. Autopass is a pure python version.\nFor ssh, a `yes` confirmation is also issued automatically\nfor you if necessary.\n\n**No third party module is needed! No need pexpect!**\n\n## Installation\n\n```shell\n$ pip install autopass\n```\n\n## Usage\n\n``` shell\n$ python -m autopass -p'passwd' sudo <command>\n$ AUTOPASS='passwd' python -m autopass [-t<N>] ssh user@domain [-p port] <command>\n```\n\n`-p<passwd>`, specify the password.\n\n`-t<N>`, specify a timeout in seconds. SIGKILL will be issued to\nchild process after timeout. No timeout by default.\n\nPassword will be issued only once, so if the password is not correct,\nthe child process will wait for a long time. This is your chance to\nplace a timeout. Other cases for using timeout might be facing the\nterrible network. You can always place a relatively large timeout\nvalue to keep you from waiting like forever.\n\nPassword can also be exported to `AUTOPASS` environment variable.\n\n``` shell\n$ export AUTOPASS='passwd'\n$ python -m autopass <passwd-needed-command>\n```\n\nAutopass is focused on command execution, locally or remotely. It cannot\nbe used interactively. And please do not start a background process by\nautopass, like `-f` option of ssh. It is an error. But you definitely\ncould run autopass with command as a whole in background (by `&`).\n\nExit code of the executed command is return by autopass, you can\nuse `echo $?` in your shell script to check if the command execution\nis successful.\n\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 xinlin-z for autopass  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  Additional Information: https://github.com/xinlin-z/autopass https://cs.pynote.net ",
    "summary": "Entering password automatically for sudo, ssh, scp",
    "version": "0.13",
    "project_urls": {
        "homepage": "https://github.com/xinlin-z/autopass"
    },
    "split_keywords": [
        "password",
        "scp",
        "ssh",
        "sshpass",
        "sudo"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "78e4e3174cc5826c35e09715a2e0f37444792e25f0629ed163988031d4fe065a",
                "md5": "b6561d48b406e666737e44e3b51e3f96",
                "sha256": "b2569a1e9df3e5519a5acb7c0e2db31262efbf0918884a92a7e372b4dabcddd3"
            },
            "downloads": -1,
            "filename": "autopass-0.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b6561d48b406e666737e44e3b51e3f96",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5316,
            "upload_time": "2023-11-08T07:14:31",
            "upload_time_iso_8601": "2023-11-08T07:14:31.051820Z",
            "url": "https://files.pythonhosted.org/packages/78/e4/e3174cc5826c35e09715a2e0f37444792e25f0629ed163988031d4fe065a/autopass-0.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "740a2846ecaaeff460782a9180467f4cd10c049c4785f6e04899999c8b2be9a6",
                "md5": "c32349d64012267214ef72deb67e97dd",
                "sha256": "df60007a3e4ba44e924996ec6c82908e697fc4e163c3499937527edc792aef78"
            },
            "downloads": -1,
            "filename": "autopass-0.13.tar.gz",
            "has_sig": false,
            "md5_digest": "c32349d64012267214ef72deb67e97dd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 4390,
            "upload_time": "2023-11-08T07:14:32",
            "upload_time_iso_8601": "2023-11-08T07:14:32.812992Z",
            "url": "https://files.pythonhosted.org/packages/74/0a/2846ecaaeff460782a9180467f4cd10c049c4785f6e04899999c8b2be9a6/autopass-0.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-08 07:14:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "xinlin-z",
    "github_project": "autopass",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "autopass"
}
        
Elapsed time: 0.21690s