az-ssh-wrapper


Nameaz-ssh-wrapper JSON
Version 1.0.3 PyPI version JSON
download
home_pageNone
SummarySSH Wrapper for Azure CLI's `az ssh` command
upload_time2024-11-14 01:41:54
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2023 David Wales, South Western Sydney Primary Health Network 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.
keywords ansible azure ssh wrapper
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Az SSH Wrapper

This package provides a wrapper script for the Azure CLI `az ssh`
command. This makes it possible to use `az ssh` with programs which
expect the standard SSH interface, such as Ansible. This is useful for
example if you want to deploy an Ansible role to an Azure VM, and you
want to automatically connect to the VM using `az ssh`, rather than
needing to manage SSH keys, etc.

`az-ssh` accepts all the standard SSH arguments, and passes them on
directly to `az ssh`.

It filters out the `ControlMaster` and `ControlPersist` options, as
there is a known issue using these options with `az ssh`, which causes
`az ssh` to block for the duration of the `ControlPersist` value. See
the following GitHub issue for details:

https://github.com/Azure/azure-cli-extensions/issues/7285

## Requirements

- [Azure CLI][azure-cli]
- An Azure VM with the `AADSSHLoginForLinux` VM extension installed.
- An Entra account with the `Virtual Machine Administrator Login` or
  `Virtual Machine User Login` role configured for the VM.
- Linux or WSL (Windows is not supported due to
  <https://github.com/PowerShell/PowerShell/issues/24585>).

## Install from PyPI

Install with `pip`, `pipx` or `uv tool`.

```
pip install az-ssh-wrapper
```

```
pipx install az-ssh-wrapper
```

```
uv tool install az-ssh-wrapper
```

## Install latest development version from GitHub

Install with `pip`, `pipx` or `uv tool`

```
pip install az-ssh-wrapper@git+https://github.com/swsphn/az-ssh-wrapper.git
```

```
pipx install az-ssh-wrapper@git+https://github.com/swsphn/az-ssh-wrapper.git
```

```
uv tool install az-ssh-wrapper@git+https://github.com/swsphn/az-ssh-wrapper.git
```

Note: While the package is called `az-ssh-wrapper`, the installed
executable is called `az-ssh`.

## Examples

If you can already connect to a VM using the following Azure CLI
command, this wrapper will enable Ansible to connect in the same way:

    az ssh vm --ip 1.2.3.4

For example, the above command using this wrapper is:

    az-ssh 1.2.3.4

If you need to pass options or arguments to SSH, Azure CLI requires you
to use the following syntax:

    az ssh vm --ip 1.2.3.4 -- <options>

For example, to connect to the server, run the `date` command, then
exit:

    az ssh vm --ip 1.2.3.4 -- date

In contrast, Az SSH Wrapper allows you to use the standard SSH form:

    az-ssh 1.2.3.4 date

## Use with Ansible

After installing this package you can simply specify
`ansible_ssh_executable = az-ssh`, and it will automatically connect to
the VM using your Azure credentials with your existing Azure CLI login.
For example, you could configure this as a variable in your hosts
inventory file.

[azure-cli]: https://learn.microsoft.com/en-gb/cli/azure/install-azure-cli

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "az-ssh-wrapper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "ansible, azure, ssh, wrapper",
    "author": null,
    "author_email": "David Wales <david.wales@swsphn.com.au>",
    "download_url": "https://files.pythonhosted.org/packages/ad/fe/627d269bf27931712a56d7ea3c3dba077a384bfa3c2c1ee160fe3674d5c5/az_ssh_wrapper-1.0.3.tar.gz",
    "platform": null,
    "description": "# Az SSH Wrapper\n\nThis package provides a wrapper script for the Azure CLI `az ssh`\ncommand. This makes it possible to use `az ssh` with programs which\nexpect the standard SSH interface, such as Ansible. This is useful for\nexample if you want to deploy an Ansible role to an Azure VM, and you\nwant to automatically connect to the VM using `az ssh`, rather than\nneeding to manage SSH keys, etc.\n\n`az-ssh` accepts all the standard SSH arguments, and passes them on\ndirectly to `az ssh`.\n\nIt filters out the `ControlMaster` and `ControlPersist` options, as\nthere is a known issue using these options with `az ssh`, which causes\n`az ssh` to block for the duration of the `ControlPersist` value. See\nthe following GitHub issue for details:\n\nhttps://github.com/Azure/azure-cli-extensions/issues/7285\n\n## Requirements\n\n- [Azure CLI][azure-cli]\n- An Azure VM with the `AADSSHLoginForLinux` VM extension installed.\n- An Entra account with the `Virtual Machine Administrator Login` or\n  `Virtual Machine User Login` role configured for the VM.\n- Linux or WSL (Windows is not supported due to\n  <https://github.com/PowerShell/PowerShell/issues/24585>).\n\n## Install from PyPI\n\nInstall with `pip`, `pipx` or `uv tool`.\n\n```\npip install az-ssh-wrapper\n```\n\n```\npipx install az-ssh-wrapper\n```\n\n```\nuv tool install az-ssh-wrapper\n```\n\n## Install latest development version from GitHub\n\nInstall with `pip`, `pipx` or `uv tool`\n\n```\npip install az-ssh-wrapper@git+https://github.com/swsphn/az-ssh-wrapper.git\n```\n\n```\npipx install az-ssh-wrapper@git+https://github.com/swsphn/az-ssh-wrapper.git\n```\n\n```\nuv tool install az-ssh-wrapper@git+https://github.com/swsphn/az-ssh-wrapper.git\n```\n\nNote: While the package is called `az-ssh-wrapper`, the installed\nexecutable is called `az-ssh`.\n\n## Examples\n\nIf you can already connect to a VM using the following Azure CLI\ncommand, this wrapper will enable Ansible to connect in the same way:\n\n    az ssh vm --ip 1.2.3.4\n\nFor example, the above command using this wrapper is:\n\n    az-ssh 1.2.3.4\n\nIf you need to pass options or arguments to SSH, Azure CLI requires you\nto use the following syntax:\n\n    az ssh vm --ip 1.2.3.4 -- <options>\n\nFor example, to connect to the server, run the `date` command, then\nexit:\n\n    az ssh vm --ip 1.2.3.4 -- date\n\nIn contrast, Az SSH Wrapper allows you to use the standard SSH form:\n\n    az-ssh 1.2.3.4 date\n\n## Use with Ansible\n\nAfter installing this package you can simply specify\n`ansible_ssh_executable = az-ssh`, and it will automatically connect to\nthe VM using your Azure credentials with your existing Azure CLI login.\nFor example, you could configure this as a variable in your hosts\ninventory file.\n\n[azure-cli]: https://learn.microsoft.com/en-gb/cli/azure/install-azure-cli\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 David Wales, South Western Sydney Primary Health Network  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.",
    "summary": "SSH Wrapper for Azure CLI's `az ssh` command",
    "version": "1.0.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/swsphn/az-ssh-wrapper/issues",
        "Repository": "https://github.com/swsphn/az-ssh-wrapper"
    },
    "split_keywords": [
        "ansible",
        " azure",
        " ssh",
        " wrapper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2148e009076504b956689a64d558722959a7042ff7c5ef4594e675de9006ffd4",
                "md5": "6185adeec28779e759a63efa2708eba2",
                "sha256": "b1f6afed8d4f865d59a8ae80f1209e2535339c4b2f561f505fc3dae9c26b6ab1"
            },
            "downloads": -1,
            "filename": "az_ssh_wrapper-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6185adeec28779e759a63efa2708eba2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 5287,
            "upload_time": "2024-11-14T01:41:52",
            "upload_time_iso_8601": "2024-11-14T01:41:52.888779Z",
            "url": "https://files.pythonhosted.org/packages/21/48/e009076504b956689a64d558722959a7042ff7c5ef4594e675de9006ffd4/az_ssh_wrapper-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "adfe627d269bf27931712a56d7ea3c3dba077a384bfa3c2c1ee160fe3674d5c5",
                "md5": "8644e348c26372855e21a11af9c9995d",
                "sha256": "6f27f7aff818a9c45fa9a8600e7b56b299da4bfd00d387ab5d10dbfe5ae30bbd"
            },
            "downloads": -1,
            "filename": "az_ssh_wrapper-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "8644e348c26372855e21a11af9c9995d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 4778,
            "upload_time": "2024-11-14T01:41:54",
            "upload_time_iso_8601": "2024-11-14T01:41:54.647953Z",
            "url": "https://files.pythonhosted.org/packages/ad/fe/627d269bf27931712a56d7ea3c3dba077a384bfa3c2c1ee160fe3674d5c5/az_ssh_wrapper-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-14 01:41:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "swsphn",
    "github_project": "az-ssh-wrapper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "az-ssh-wrapper"
}
        
Elapsed time: 0.94173s