* Use SSH_ERROR and SSH_OK instead of `-1` and `0`. * Re-factor for code duplication * No longer call `ssh_set_error_invalid(ssh_session)` when the ssh_session is NULL.