summaryrefslogtreecommitdiffhomepage
path: root/cli-auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli-auth.c')
-rw-r--r--cli-auth.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/cli-auth.c b/cli-auth.c
index ac579dc..b4baf9f 100644
--- a/cli-auth.c
+++ b/cli-auth.c
@@ -91,7 +91,7 @@ void recv_msg_userauth_banner() {
}
}
- printf("%s\n", banner);
+ fprintf(stderr, "%s\n", banner);
out:
m_free(banner);
@@ -234,6 +234,10 @@ void recv_msg_userauth_success() {
ses.authstate.authdone = 1;
cli_ses.state = USERAUTH_SUCCESS_RCVD;
cli_ses.lastauthtype = AUTH_TYPE_NONE;
+
+#ifdef ENABLE_CLI_PUBKEY_AUTH
+ cli_auth_pubkey_cleanup();
+#endif
}
void cli_auth_try() {
@@ -253,7 +257,7 @@ void cli_auth_try() {
#endif
#ifdef ENABLE_CLI_INTERACT_AUTH
- if (ses.keys->trans_algo_crypt->cipherdesc == NULL) {
+ if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
fprintf(stderr, "Sorry, I won't let you use interactive auth unencrypted.\n");
}
else if (!finished && ses.authstate.authtypes & AUTH_TYPE_INTERACT) {
@@ -268,7 +272,7 @@ void cli_auth_try() {
#endif
#ifdef ENABLE_CLI_PASSWORD_AUTH
- if (ses.keys->trans_algo_crypt->cipherdesc == NULL) {
+ if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
fprintf(stderr, "Sorry, I won't let you use password auth unencrypted.\n");
}
else if (!finished && ses.authstate.authtypes & AUTH_TYPE_PASSWORD) {