2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
|
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
|
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
|
* Wait for the result of the last authentication request.
*/
if (!gotit)
crWaitUntilV(ispkt);
while (pktin.type == SSH2_MSG_USERAUTH_BANNER) {
char *banner;
int size;
/*
* Don't show the banner if we're operating in
* non-verbose non-interactive mode. (It's probably
* a script, which means nobody will read the
* banner _anyway_, and moreover the printing of
* the banner will screw up processing on the
* output of (say) plink.)
*/
if (flags & (FLAG_VERBOSE | FLAG_INTERACTIVE)) {
ssh2_pkt_getstring(&banner, &size);
if (banner)
c_write_untrusted(banner, size);
ssh2_pkt_getstring(&banner, &size);
if (banner)
c_write_untrusted(banner, size);
}
crWaitUntilV(ispkt);
}
if (pktin.type == SSH2_MSG_USERAUTH_SUCCESS) {
logevent("Access granted");
we_are_in = TRUE;
break;
}
|
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
|
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
|
+
-
-
-
+
+
+
+
|
crWaitUntilV(ispkt);
if (pktin.type != SSH2_MSG_USERAUTH_PK_OK) {
logevent("Key refused");
continue;
}
if (flags & FLAG_VERBOSE) {
c_write_str("Authenticating with public key \"");
c_write(commentp, commentlen);
c_write_str("\" from agent\r\n");
c_write_str("Authenticating with public key \"");
c_write(commentp, commentlen);
c_write_str("\" from agent\r\n");
}
/*
* Server is willing to accept the key.
* Construct a SIGN_REQUEST.
*/
ssh2_pkt_init(SSH2_MSG_USERAUTH_REQUEST);
ssh2_pkt_addstring(username);
|