[英]openssh module in iron python from windows to linux to run commands
我在Iron python中使用openssh从Windows到Linux运行命令。 我已经在两台计算机上安装了openssh,并且该服务正在运行。 我甚至在授权用户中添加了密钥
conn = SSHConnection(ip_addr, login=name)
ret = conn.run('ls')
or
ret = conn.run(['ls'])
我收到如下错误
"C:\Program Files\IronPython 2.7\lib\site-packages\openssh_wrapper.py", line 164, in run
"C:\Program Files\IronPython 2.7\Lib\subprocess.py", line 675, in __init__
"C:\Program Files\IronPython 2.7\Lib\subprocess.py", line 887, in _execute_child
Error: [Errno 2] The system cannot find the file specified.
代码有什么问题?
我副本中的行是
ssh_command = self.ssh_command(interpreter, forward_ssh_agent)
如果未指定解释器,则默认为/bin/bash
。 我认为这是在远程计算机上看不到/ bin / bash。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.