pxssh throwing End Of File (EOF). Exception style platform exception

后端 未结 1 1907
遥遥无期
遥遥无期 2021-01-21 15:02

I am having problem using pxssh module. My code is below:

    try:
        ssh_handle = pxssh.pxssh(timeout=None)
        ssh_handle.logfile = sys.stdout
                


        
相关标签:
1条回答
  • 2021-01-21 16:03

    You can either do ssh_handle.expect(pexpect.EOF) and read the result in ssh_handle.before. Or try to remove the '\' from '(yes/no)\?' (i.e. do '(yes/no)?'). The last suggestion worked for me on Suse.

    Link: http://pexpect.sourceforge.net/doc/

    0 讨论(0)
提交回复
热议问题