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

feat: 当接收方不支持ssh连接复用时,需做出提醒 #20

Open
tulvgengenr opened this issue Jul 14, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@tulvgengenr
Copy link
Collaborator

tulvgengenr commented Jul 14, 2023

在ssh连接池初始化ssh连接时,采用的方法如下:

command = f"ssh -M -S {conn_file} -fnNT {self.username}@{self.address} -p {self.port} -i {self.sshkey_path} | exit"
process = Popen(command, shell=True)
process.communicate()

规范来说应该在子进程执行完,通过stderr判断是否开启了ssh会话(如果接收方不支持ssh复用的话,stderr会传递错误内容),进而对用户进行提醒或者不使用ssh复用。

@tulvgengenr tulvgengenr added the enhancement New feature or request label Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant