1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 13:21:38 +03:00

ssh: allow partial auth

Some systems employ multi-stage authentication, so allow for that
to work.
This commit is contained in:
Wez Furlong 2021-12-15 08:03:35 -07:00
parent 65250fbf38
commit 421bcd25c1

View File

@ -165,6 +165,7 @@ impl crate::sessioninner::SessionInner {
if auth_methods.contains(AuthMethods::PUBLIC_KEY) {
match sess.userauth_public_key_auto(None, None)? {
AuthStatus::Success => return Ok(()),
AuthStatus::Partial => continue,
_ => {}
}
}
@ -203,6 +204,7 @@ impl crate::sessioninner::SessionInner {
AuthStatus::Denied => {
break;
}
AuthStatus::Partial => continue,
status => {
anyhow::bail!("interactive auth status: {:?}", status);
}
@ -231,6 +233,7 @@ impl crate::sessioninner::SessionInner {
match sess.userauth_password(None, Some(&pw))? {
AuthStatus::Success => return Ok(()),
AuthStatus::Partial => continue,
status => anyhow::bail!("password auth status: {:?}", status),
}
}