python3 fabric建立ssh连接

from fabric import Connection

c = Connection(host="192.168.1.1", port=22, user="root", connect_kwargs={"password":"123456"})

c.run("uname -a")
posted @ 2019-07-30 17:37  lr.cool  阅读(...)  评论(...编辑  收藏