通过套接字向其他计算机发送linux命令

问题描述:

我试图通过其套接字发送命令来“控制”另一台linux计算机,例如,发送命令ls至123.222.12.1:5050。 This is an example of what I'm interested in implementing通过套接字向其他计算机发送linux命令

如果我们不使用上述weblink中显示的特殊代码(sendsockcmd),还有其他方法可以在python中做到这一点?

+4

它必须在python中吗?为什么不使用SSH例如? – cyroxx 2012-08-10 23:34:28

您应该试用paramiko模块,如在此question中所述。