From f07caacbdc0a530b051720e7e941e585265a50e8 Mon Sep 17 00:00:00 2001 From: vapao Date: Thu, 21 Jul 2022 14:32:09 +0800 Subject: [PATCH] =?UTF-8?q?U=20=E4=BC=98=E5=8C=96ssh=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/libs/ssh.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spug_api/libs/ssh.py b/spug_api/libs/ssh.py index 324c1ba..ac967b5 100644 --- a/spug_api/libs/ssh.py +++ b/spug_api/libs/ssh.py @@ -39,8 +39,7 @@ def _finalize_pubkey_algorithm(self, key_type): err = "Unable to agree on a pubkey algorithm for signing a {!r} key!" # noqa raise AuthenticationException(err.format(key_type)) else: - pubkey_algo = my_algos[0] - msg = "Server did not send a server-sig-algs list; defaulting to our first preferred algo ({!r})" # noqa + pubkey_algo = "ssh-rsa" if key_type.endswith("-cert-v01@openssh.com"): pubkey_algo += "-cert-v01@openssh.com" self.transport._agreed_pubkey_algorithm = pubkey_algo