mirror of
https://github.com/tmate-io/tmate.git
synced 2025-06-20 01:27:45 +02: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_PARTIAL:
|
||||||
case SSH_AUTH_INFO:
|
case SSH_AUTH_INFO:
|
||||||
case SSH_AUTH_DENIED:
|
case SSH_AUTH_DENIED:
|
||||||
if (client->tmate_session->need_passphrase &&
|
if (client->tmate_session->need_passphrase)
|
||||||
!client->tried_passphrase)
|
|
||||||
request_passphrase(client);
|
request_passphrase(client);
|
||||||
else
|
else
|
||||||
kill_session(client, "SSH keys not found. Run 'ssh-keygen' to create keys and try again.");
|
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;
|
return;
|
||||||
case SSH_AUTH_ERROR:
|
case SSH_AUTH_ERROR:
|
||||||
reconnect_session(client, "Auth error: %s",
|
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_SEARCHAGAIN:
|
||||||
case MODEKEYCOPY_SEARCHREVERSE:
|
case MODEKEYCOPY_SEARCHREVERSE:
|
||||||
switch (data->searchtype) {
|
switch (data->searchtype) {
|
||||||
|
#ifdef TMATE
|
||||||
|
case WINDOW_COPY_PASSWORD:
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
case WINDOW_COPY_OFF:
|
case WINDOW_COPY_OFF:
|
||||||
case WINDOW_COPY_GOTOLINE:
|
case WINDOW_COPY_GOTOLINE:
|
||||||
case WINDOW_COPY_JUMPFORWARD:
|
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_JUMPTOBACK:
|
||||||
case WINDOW_COPY_NAMEDBUFFER:
|
case WINDOW_COPY_NAMEDBUFFER:
|
||||||
case WINDOW_COPY_NUMERICPREFIX:
|
case WINDOW_COPY_NUMERICPREFIX:
|
||||||
#ifdef TMATE
|
|
||||||
case WINDOW_COPY_PASSWORD:
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case WINDOW_COPY_SEARCHUP:
|
case WINDOW_COPY_SEARCHUP:
|
||||||
ss = data->searchstr;
|
ss = data->searchstr;
|
||||||
if (cmd == MODEKEYCOPY_SEARCHAGAIN) {
|
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(data->inputstr,
|
||||||
data->password_cb_private);
|
data->password_cb_private);
|
||||||
}
|
}
|
||||||
*data->inputstr = '\0';
|
|
||||||
window_copy_copy_selection(wp, NULL);
|
|
||||||
window_pane_reset_mode(wp);
|
window_pane_reset_mode(wp);
|
||||||
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
data->numprefix = -1;
|
data->numprefix = -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user