Reputation: 641
I want to check if server signature is changed in my python code, in bash that is comparing
ssh-keyscan IP
with
ssh-keygen -F IP
(ofcourse not exactly comparing but some process needed)
How can I do that in python? For example in paramiko or without using it (preferred).
Upvotes: 2
Views: 688
Reputation: 1624
You can use the subprocess popen in combination with communicate for that purpose.
See 2502833/python-store-output-of-subprocess-popen-call-in-a-string
Upvotes: 1