Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle missing SSH key error #69

Merged
merged 3 commits into from Mar 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion jupyter_forward/core.py
Expand Up @@ -80,7 +80,14 @@ def __post_init__(self):
for _ in range(2):
try:
loc_transport = self.session.client.get_transport()
loc_transport.auth_interactive_dumb(self.session.user, _authentication_handler)
try:
loc_transport.auth_interactive_dumb(
self.session.user, _authentication_handler
)
except paramiko.ssh_exception.BadAuthenticationType:
# It is not clear why auth_interactive_dumb fails in some cases, but
# in the examples we could generate auth_password was successful
loc_transport.auth_password(self.session.user, getpass.getpass())
self.session.transport = loc_transport
break
except Exception:
Expand Down