Open ebreton opened 1 year ago
I think that the issue can be found in : https://github.com/Fizzadar/pyinfra/blob/e10bdc8916348a7bafaa903230c280b039e7f6df/pyinfra/connectors/sshuserclient/client.py#L173-L179
There is no timeout passed when establishing this channel. In paramiko 2.12, the default timeout of open_channel
is 3600 seconds, and the channel_timeout
parameter of SSHClient.connect doesn't exist yet.
I would like to reduce the connection timeout to 5 seconds when connecting to my hosts , through a ProxyJump
The ~/.ssh/config file is properly set on my host:
The expected behaviour with pyinfra is the same one as handled by a SSH from shell: timeout after 5 secs:
But when I try to connect with pyinfra, the connection hangs on with the default timeout (120 secs)
I have tried to provide to pyinfra a timeout of 2 seconds through the inventory.py :
But to no success
Meta
pyinfra --support
.-vv
and--debug
.