From 606d2c89330a934fa116f944af053f09d3392d1b Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Thu, 16 May 2024 17:31:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=B3=E9=97=ADssh=20client=E5=90=8E?= =?UTF-8?q?=EF=BC=8Csftp=EF=BC=8Ctelnet=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E8=BF=9E=E6=8E=A5=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/connect_methods.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/terminal/connect_methods.py b/apps/terminal/connect_methods.py index 0294ccab1..9f40556da 100644 --- a/apps/terminal/connect_methods.py +++ b/apps/terminal/connect_methods.py @@ -253,8 +253,9 @@ class ConnectMethodUtil: def _filter_disable_protocols_connect_methods(cls, methods): # 过滤一些特殊的协议方式 if not getattr(settings, 'TERMINAL_KOKO_SSH_ENABLED'): - protocol = Protocol.ssh - methods[protocol] = [m for m in methods[protocol] if m['type'] != 'native'] + disable_ssh_client_protocols = [Protocol.ssh, Protocol.sftp, Protocol.telnet] + for protocol in disable_ssh_client_protocols: + methods[protocol] = [m for m in methods[protocol] if m['type'] != 'native'] return methods @classmethod