diff --git a/appl/telnet/telnet/main.c b/appl/telnet/telnet/main.c index f450c3ab9..e9c460277 100644 --- a/appl/telnet/telnet/main.c +++ b/appl/telnet/telnet/main.c @@ -329,6 +329,7 @@ main(int argc, char **argv) #if defined(ENCRYPTION) encrypt_auto(1); decrypt_auto(1); + wantencryption = -1; #endif } diff --git a/appl/telnet/telnet/telnet.c b/appl/telnet/telnet/telnet.c index 0e3708846..9d22d8c81 100644 --- a/appl/telnet/telnet/telnet.c +++ b/appl/telnet/telnet/telnet.c @@ -2071,9 +2071,13 @@ my_telnet(char *user) send_will(TELOPT_ENCRYPT, 1); while (1) { if (my_want_state_is_wont(TELOPT_AUTHENTICATION)) { - printf("\nServer refused to negotiate authentication,\n"); - printf("which is required for encryption.\n"); - Exit(1); + if (wantencryption == -1) { + break; + } else { + printf("\nServer refused to negotiate authentication,\n"); + printf("which is required for encryption.\n"); + Exit(1); + } } if (auth_has_failed) { printf("\nAuthentication negotation has failed,\n");