python - Python 中的并行 SSH

标签 python ssh parallel-processing

我想知道在 python 中处理并行 SSH 连接的最佳方法是什么。 我需要打开几个 SSH 连接以保留在后台并以交互式或定时批处理方式提供命令。 这可以用 paramiko 库来做吗?最好不要为每个连接生成不同的 SSH 进程。

谢谢。

最佳答案

可能值得检查一下 Twisted 中可用的选项。例如,Twisted.Conch 页面报告:

http://twistedmatrix.com/users/z3p/files/conch-talk.html

Unlike OpenSSH, the Conch server does not fork a process for each incoming connection. Instead, it uses the Twisted reactor to multiplex the connections.

关于python - Python 中的并行 SSH,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1185855/

相关文章:

ssh - 如何解决 ClusterSSH 错误 "No Protocol specified"

linux - 通过 SSH 启动一个长时间运行的程序

c++ - 在 C++ 中通过 SSH 隧道连接到 MySQL

asp.net - .NET Parallel.ForEach 可能会弄乱 NHibernate 上下文 session

c++ - openMP 新手,有什么建议可以将以下代码与 openMP 并行吗?

python - 如何在 try block 中的条件执行相同的代码而不在 except 子句中重复代码

python - 使用 python/django 关闭套接字并避免 Errno 10054 的正确方法是什么

python - 如何在 python 中使用 numba.jit 将计算值传递给列表排序?

python - 具有 lambda 函数的 Pandas .filter() 方法

haskell - 并行排序 IO 操作