Update ssh_local.py

This commit is contained in:
dami 2025-05-24 00:51:29 +08:00
parent b2785070bc
commit caeff7de55
1 changed files with 8 additions and 0 deletions

View File

@ -34,6 +34,7 @@ class ssh_local(object):
__log_type = 'SSH终端'
__ssh = None
__lock = False
# lock
_instance_lock = threading.Lock()
@ -61,6 +62,11 @@ class ssh_local(object):
def connectSsh(self):
if self.__lock :
return False
self.__lock = True
import paramiko
ssh = paramiko.SSHClient()
mw.createSshInfo()
@ -80,6 +86,8 @@ class ssh_local(object):
shell = ssh.invoke_shell(term='xterm', width=83, height=21)
shell.setblocking(0)
self.__lock = True
return shell
def send(self):