From 0fe0b50da08566a2e6d86692c29415ee4edaa43c Mon Sep 17 00:00:00 2001 From: vapao Date: Mon, 31 Oct 2022 17:05:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=AA=8C=E8=AF=81=E4=B8=BB?= =?UTF-8?q?=E6=9C=BA=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/apps/host/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spug_api/apps/host/views.py b/spug_api/apps/host/views.py index c8d9472..377da26 100644 --- a/spug_api/apps/host/views.py +++ b/spug_api/apps/host/views.py @@ -208,7 +208,7 @@ def _do_host_verify(form): with SSH(form.hostname, form.port, form.username, password=password) as ssh: ssh.add_public_key(public_key) except BadAuthenticationType: - raise Exception('该主机不支持密钥认证,请参考官方文档,错误代码:E01') + raise Exception('该主机不支持密码认证,请参考官方文档,错误代码:E00') except AuthenticationException: raise Exception('密码连接认证失败,请检查密码是否正确') except socket.timeout: