SSH - Python with paramiko issue

前端 未结 2 1265
刺人心
刺人心 2021-01-12 09:13

I\'ve been trying to get this to work but keep getting the same errors. I\'ve tried the fqdn and ip of the host. I\'ve tried to pass it with credentials and without. I\'ve l

2条回答
  •  孤城傲影
    2021-01-12 10:10

    before ssh.connect you need:
    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

    Then you need to do something with stdout.read() like:

    print stdout.read()
    

提交回复
热议问题