#!/usr/bin/env python3 import paramiko client = paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect("107.173.30.245", username="root", password="Xiao4669805", timeout=20) for c in [ "ss -tlnp | grep ':80 '", "ss -tlnp | grep ':3000 '", "curl -sI http://127.0.0.1/ | head -10", "curl -sI http://127.0.0.1:3000/ | head -10", "curl -sI -H 'Host: book.noamdro.com' http://127.0.0.1/ | head -10", ]: print(">", c) _, stdout, _ = client.exec_command(c) print(stdout.read().decode()) client.close()