mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-08 01:04:06 +01:00
ssh key passphrase fix
This commit is contained in:
parent
55e6a774a8
commit
4c5522f7fa
@ -283,11 +283,13 @@ static void on_session_event(struct tmate_ssh_client *client)
|
||||
case SSH_AUTH_PARTIAL:
|
||||
case SSH_AUTH_INFO:
|
||||
case SSH_AUTH_DENIED:
|
||||
if (client->tmate_session->need_passphrase &&
|
||||
!client->tried_passphrase)
|
||||
if (client->tmate_session->need_passphrase)
|
||||
request_passphrase(client);
|
||||
else
|
||||
kill_session(client, "SSH keys not found. Run 'ssh-keygen' to create keys and try again.");
|
||||
|
||||
if (client->tried_passphrase)
|
||||
tmate_status_message("Can't load SSH key. Try typing passphrase again in case of typo. ctrl-c to abort.");
|
||||
return;
|
||||
case SSH_AUTH_ERROR:
|
||||
reconnect_session(client, "Auth error: %s",
|
||||
|
@ -669,6 +669,10 @@ __window_copy_key(struct window_pane *wp, struct client *c, struct session *sess
|
||||
case MODEKEYCOPY_SEARCHAGAIN:
|
||||
case MODEKEYCOPY_SEARCHREVERSE:
|
||||
switch (data->searchtype) {
|
||||
#ifdef TMATE
|
||||
case WINDOW_COPY_PASSWORD:
|
||||
break;
|
||||
#endif
|
||||
case WINDOW_COPY_OFF:
|
||||
case WINDOW_COPY_GOTOLINE:
|
||||
case WINDOW_COPY_JUMPFORWARD:
|
||||
@ -677,10 +681,6 @@ __window_copy_key(struct window_pane *wp, struct client *c, struct session *sess
|
||||
case WINDOW_COPY_JUMPTOBACK:
|
||||
case WINDOW_COPY_NAMEDBUFFER:
|
||||
case WINDOW_COPY_NUMERICPREFIX:
|
||||
#ifdef TMATE
|
||||
case WINDOW_COPY_PASSWORD:
|
||||
break;
|
||||
#endif
|
||||
case WINDOW_COPY_SEARCHUP:
|
||||
ss = data->searchstr;
|
||||
if (cmd == MODEKEYCOPY_SEARCHAGAIN) {
|
||||
@ -850,9 +850,8 @@ window_copy_key_input(struct window_pane *wp, key_code key)
|
||||
data->password_cb(data->inputstr,
|
||||
data->password_cb_private);
|
||||
}
|
||||
*data->inputstr = '\0';
|
||||
window_copy_copy_selection(wp, NULL);
|
||||
window_pane_reset_mode(wp);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
data->numprefix = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user