ssh_wait module and ssh-wait command
ssh-wait command
Usage: ssh-wait <options> <host>
ssh-wait will wait for the service to be available
on <host>.
--verbose
- print progress messages
--nowait
- check once and exit 0 if can connect exit 1 if cannot
--wait-limit=<limit>
- exit 2 if service is not avaiable within <limit> seconds.
defaults to 600.
--service=<service>
- check the service <service>. Can be a service
name or a port number. Default is ssh.
ssh_wait module
ssh_wait module
ssh_wait( host, service='ssh', wait=True, wait_limit=600, log_fn=print )
The ssh_wait function waits for host to be available if 'wait` is True. Otherwise
it will checks once and returns.
The return code to indicate status of the host:
- 0 - success the host is accepting ssh connections
- 1 - failed to connect to host
- 2 - failed to connect within
wait_limitseconds - 3 -
serviceis not known
The service argument can be either the name of the service (as listed in /etc/services) or the port number.
By default log_fn is the print function and will be used to log messages.
Pass None for log_fn to surpress all messages.
Metadata
Release files for ssh-wait 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ssh_wait-1.0.3.tar.gz | 7.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ssh_wait-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.8 kB
Release files / ssh_wait-1.0.3.tar.gz
| Download URL | ssh_wait-1.0.3.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
02a7926b4792b42b26cfe3844acfeed3551e362906f249db0b0809590a1493c3
|
|
BLAKE2b-256 checksum How to use checksums |
047d62eb428c31424fbb87dd944fc8654b4f0dfd608dd9f1b580be144e2dddf7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / ssh_wait-1.0.3-py3-none-any.whl
| Download URL | ssh_wait-1.0.3-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ce1e5035a0db6dda14b3a54c96460a209fb617b67f98b901ab01eaf3a87ed9d
|
|
BLAKE2b-256 checksum How to use checksums |
6ae25f48184e1b65e1260df3455203b753762ca0493f0b1f2df561dc00979d22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|