static const struct ssh_kex *kex = NULL;
static const struct ssh_signkey *hostkey = NULL;
static unsigned char ssh2_session_id[20];
-int (*ssh_get_line) (const char *prompt, char *str, int maxlen,
- int is_pw) = NULL;
static char *savedhost;
static int savedport;
static int pos = 0;
static char c;
if ((flags & FLAG_INTERACTIVE) && !*cfg.username) {
- if (ssh_get_line) {
+ if (ssh_get_line && !ssh_getline_pw_only) {
if (!ssh_get_line("login as: ",
username, sizeof(username), FALSE)) {
/*
* it again.
*/
} else if ((flags & FLAG_INTERACTIVE) && !*cfg.username) {
- if (ssh_get_line) {
+ if (ssh_get_line && !ssh_getline_pw_only) {
if (!ssh_get_line("login as: ",
username, sizeof(username), FALSE)) {
/*
static int authed = FALSE;
void *r;
+ ssh_pkt_ctx &= ~SSH2_PKTCTX_AUTH_MASK;
ssh_pkt_ctx |= SSH2_PKTCTX_PUBLICKEY;
tried_agent = TRUE;
tried_pubkey_config = TRUE;
+ ssh_pkt_ctx &= ~SSH2_PKTCTX_AUTH_MASK;
ssh_pkt_ctx |= SSH2_PKTCTX_PUBLICKEY;
/*
type = AUTH_TYPE_KEYBOARD_INTERACTIVE;
tried_keyb_inter = TRUE;
+ ssh_pkt_ctx &= ~SSH2_PKTCTX_AUTH_MASK;
ssh_pkt_ctx |= SSH2_PKTCTX_KBDINTER;
ssh2_pkt_init(SSH2_MSG_USERAUTH_REQUEST);
type = AUTH_TYPE_KEYBOARD_INTERACTIVE;
tried_keyb_inter = TRUE;
+ ssh_pkt_ctx &= ~SSH2_PKTCTX_AUTH_MASK;
ssh_pkt_ctx |= SSH2_PKTCTX_KBDINTER;
if (curr_prompt == 0) {
if (!method && can_passwd) {
method = AUTH_PASSWORD;
+ ssh_pkt_ctx &= ~SSH2_PKTCTX_AUTH_MASK;
ssh_pkt_ctx |= SSH2_PKTCTX_PASSWORD;
sprintf(pwprompt, "%.90s@%.90s's password: ", username,
savedhost);