15 lines
497 B
Python
15 lines
497 B
Python
import paramiko
|
|
|
|
ssh = paramiko.SSHClient()
|
|
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
ssh.connect('140.44.4.41', username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
|
|
|
|
_, out, _ = ssh.exec_command("curl -s https://coder.snarfnet.net/api/v2/users/first")
|
|
print("First user status:", out.read().decode())
|
|
|
|
_, out2, _ = ssh.exec_command("curl -s https://coder.snarfnet.net/api/v2/experiments")
|
|
print("Experiments:", out2.read().decode())
|
|
|
|
ssh.close()
|
|
|