aboutsummaryrefslogtreecommitdiff
path: root/src/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.c')
-rw-r--r--src/client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client.c b/src/client.c
index a7ef4132..66d4a9ae 100644
--- a/src/client.c
+++ b/src/client.c
@@ -509,9 +509,11 @@ static void ssh_client_connection_callback(ssh_session session){
/* Here we decide which version of the protocol to use. */
if (ssh2 && session->ssh2) {
session->version = 2;
- } else if(ssh1 && session->ssh1) {
+#ifdef WITH_SSH1
+ } else if(ssh1 && session->ssh1) {
session->version = 1;
- } else if(ssh1 && !session->ssh1){
+#endif
+ } else if(ssh1 && !session->ssh1){
#ifdef WITH_SSH1
ssh_set_error(session, SSH_FATAL,
"SSH-1 protocol not available (configure session to allow SSH-1)");