diff -up x2goclient-4.0.5.0/src/sshmasterconnection.cpp.pubkey x2goclient-4.0.5.0/src/sshmasterconnection.cpp
--- x2goclient-4.0.5.0/src/sshmasterconnection.cpp.pubkey 2015-07-27 20:50:35.000000000 -0600
+++ x2goclient-4.0.5.0/src/sshmasterconnection.cpp 2015-09-21 21:38:43.318974144 -0600
@@ -1091,7 +1091,7 @@ bool SshMasterConnection::userAuthWithKe
return false;
}
ssh_public_key pubkey=publickey_from_privatekey(prkey);
- if (!prkey)
+ if (!pubkey)
{
#ifdef DEBUG
x2goDebug<<"Failed to get public key from private key."<<endl;