When ConnectTimeout=0 parameter is remote execution fails immediately. But ssh command to same client works without any problem.
The remote execution should work when ConnectTimeout=0 is set.
Foreman and Proxy versions:
Other relevant data:
If we see man page of ssh_config then it says,
Specifies the timeout (in seconds) used when connecting to the SSH server, instead of using the default system TCP timeout. This value is used only when the target is down or really unreachable, not when it refuses the connection.
But net-ssh gem is directly considering ConnectTimeout as timeout value and connection is getting terminated immediately. I want to know if it would be wise to handle it like - https://github.com/net-ssh/net-ssh/issues/632#issuecomment-422038473