Adds interactive SSH capabilities to Ansible, especially useful in setups with VMs in private subnets accessible only via jumphosts.
It uses Ansible’s inventory file so any ansible_ssh_common_args or ansible_ssh_extra_args apply to ansible-ssh as well.
Requirements
ansible
pip
Usage
Run with -h for command-line help:
usage: ansible-ssh [-h] [--inventory INVENTORY] [--key-file KEYFILE]
[--user USER] [--verbose] [--become]
host
positional arguments:
host the host to ssh into, if not provided a list of hosts
in current inventory file is printed
optional arguments:
-h, --help show this help message and exit
--inventory INVENTORY, -i INVENTORY
ansible inventory file to use instead of the one
defined in ansible.cfg
--key-file KEYFILE, -k KEYFILE
ssh private key file to use instead of the default for
the user
--user USER, -u USER, -l USER
override the user defined in ansible inventory file
--verbose, -v pass verbose flag to ssh command
--become, -b ssh as root instead of the inventory-supplied account
Example
$ ansible-ssh lb-0
executing ssh -C -o ControlMaster=auto -o ControlPersist=60s -o ProxyCommand="ssh -W %h:%p -q ubuntu@10.200.100.60" -l ubuntu 192.168.1.30
Last login: Sat May 25 15:40:13 2019 from 192.168.1.100
ubuntu@lb-0:~$
Metadata
Release files for ansible-ssh 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ansible-ssh-0.9.1.tar.gz | 3.0 kB | Without provenance | Details for ansible-ssh-0.9.1.tar.gz |
Release files / ansible-ssh-0.9.1.tar.gz
| Download URL | ansible-ssh-0.9.1.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91a3d503fa09bc658d4d6bf4702df0c81a7a710462bdf52db9246f0c8c458f88
|
|
BLAKE2b-256 checksum How to use checksums |
492c6022b3ba4037935c7e3af2e8e0b4446af2151e45ff195e75d0509d364c01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/2.7.17
|
Security for ansible-ssh 0.9.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.