2015-01-14 2 views
0

openssh를 철 python으로 사용하여 리눅스에서 명령을 실행합니다. 두 컴퓨터에 openssh를 설치했고 서비스가 실행 중입니다. 나는 다음과 같이도openssh 모듈을 iron python으로 windows에서 linux로 명령어를 실행합니다.

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. 

코드에 어떤 문제가 오류가 발생하고 인증 된 사용자에 키를 추가 한?

+0

subprocess.py 줄 887에 무엇이 있습니까? –

답변

0

내 사본의 행은 /bin/bash

ssh_command = self.ssh_command(interpreter, forward_ssh_agent) 

곳 통역, 지정하지 않을 경우 기본값입니다. 나는 그것이 원격 머신에서/bin/bash를 보지 못한다고 말하고 있다고 생각한다.

관련 문제