import paramiko ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect('8.137.181.63', port=22, username='root', password='liyanxia@6688', timeout=15) endpoints = [ 'https://yjyf.gzyakj.com.cn/api/home/cats', 'https://yjyf.gzyakj.com.cn/api/home/index', 'https://yjyf.gzyakj.com.cn/api/common/dicts', 'https://yjyf.gzyakj.com.cn/api/home/agreement?type=user_agreement', 'https://yjyf.gzyakj.com.cn/s.php/index/login' ] for ep in endpoints: stdin, stdout, stderr = ssh.exec_command(f'curl -k -s -w "\nHTTP_STATUS:%{{http_code}}" "{ep}"') res = stdout.read().decode('utf-8') lines = res.strip().splitlines() status_line = lines[-1] if lines else '' body_preview = lines[0][:120] if len(lines) > 1 else '' print(f"[{status_line}] {ep} -> {body_preview}") ssh.close()