from fabric import Connection c = Connection(host="192.168.1.1", port=22, user="root", connect_kwargs={"password":"123456"}) c.run("uname -a")