Combine code for SSH_CONNECTION and SSH_CLIENT