diff --git a/cli-kex.c b/cli-kex.c index c3b8846..6cb75c2 100644 --- a/cli-kex.c +++ b/cli-kex.c @@ -229,6 +229,8 @@ static void ask_to_confirm(const unsigned char* keyblob, unsigned int keybloblen fclose(tty); } else { response = getc(stdin); + /* flush stdin buffer */ + while ((getchar()) != '\n'); } if (response == 'y') {