SSH wait
Project description
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_limit
seconds - 3 -
service
is 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ssh-wait-1.0.1.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for ssh_wait-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3adcab02a6e4e552ea0b8f0d4ce7791a47137c02d4c9120d866e88d5480831bc |
|
MD5 | 2028ac7bdc6b4386787a651e7e27c2ab |
|
BLAKE2b-256 | 36f626cfb6c136f6e151506d0d4563b76d4c784841832e3427fdcdbbc0401dc4 |