import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('ip', port, 'username', 'password')
stdin, stdout, stderr = ssh.exec_command('df')
print(stdout.read())
stdin, stdout, stderr = ssh.exec_command('curl http://www.baidu.com')
print(stdout.read())