Crypto/ssh: Does Session.Wait() also return if the connection ended?

Hello! Does Session.Wait() return if the main SSH connection ended?

In Godoc it’s written

 Wait waits for the remote command to exit.

The returned error is nil if the command runs, has no problems copying stdin, stdout, and stderr, and exits with a zero exit status.

If the remote server does not send an exit status, an error of type *ExitMissingError is returned. If the command completes unsuccessfully or is interrupted by a signal, the error is of type *ExitError. Other error types may be returned for I/O problems. 

But it’s not clear if it keep blocking even though the SSH connection ended

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.