diff --git a/cli-kex.c b/cli-kex.c
index 077fec9051cde8590169ef41e600b89e91457c04..936b95ccbd7093e3dc3009f2ea56ec80a5ecf27a 100644
--- a/cli-kex.c
+++ b/cli-kex.c
@@ -186,7 +186,7 @@ static void ask_to_confirm(unsigned char* keyblob, unsigned int keybloblen,
 
 	char* fp = NULL;
 	FILE *tty = NULL;
-	char response = 'z';
+	int response = 'z';
 
 	fp = sign_key_fingerprint(keyblob, keybloblen);
 	if (cli_opts.always_accept_key) {