aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2012-11-09 15:56:38 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2012-11-09 15:56:38 +0100
commit62d207adea95518ae3db31cd2938cca32bd4e61b (patch)
tree03fea6c569e2918ec14331b28c24d55b6100b29d /src
parentafd75ad6e7353df58d2a55376cc54ab8423e09e7 (diff)
downloadlibpam-x2go-62d207adea95518ae3db31cd2938cca32bd4e61b.tar.gz
libpam-x2go-62d207adea95518ae3db31cd2938cca32bd4e61b.tar.bz2
libpam-x2go-62d207adea95518ae3db31cd2938cca32bd4e61b.zip
report the type of error during SSH connection
Diffstat (limited to 'src')
-rw-r--r--src/x2go-auth-check.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/x2go-auth-check.c b/src/x2go-auth-check.c
index 936bea9..9e1aba3 100644
--- a/src/x2go-auth-check.c
+++ b/src/x2go-auth-check.c
@@ -71,9 +71,10 @@ main (int argc, char * argv[])
printf ("4\n");
int rc;
- rc = ssh_connect (auth_check_ssh_session);
+ rc = ssh_connect ( auth_check_ssh_session );
printf ("%i\n", rc);
if ( rc != SSH_OK ) {
+ fprintf ( stderr, "Error connecting to via SSH: %s\n", ssh_get_error ( auth_check_ssh_session ) );
ssh_free(auth_check_ssh_session);
return -1;
}
@@ -82,6 +83,7 @@ main (int argc, char * argv[])
rc = ssh_userauth_password ( auth_check_ssh_session, NULL, password );
if ( rc != SSH_AUTH_SUCCESS ) {
+ fprintf ( stderr, "Error connecting to via SSH: %s\n", ssh_get_error ( auth_check_ssh_session ) );
ssh_disconnect(auth_check_ssh_session);
ssh_free(auth_check_ssh_session);
return -1;