Skip to content

Instantly share code, notes, and snippets.

@apackeer
Created September 30, 2012 06:59
Show Gist options
  • Save apackeer/3806106 to your computer and use it in GitHub Desktop.
Save apackeer/3806106 to your computer and use it in GitHub Desktop.
paramiko example
from paramiko import SSHClient
client = SSHClient()
client.load_system_host_keys()
client.connect('192.168.137.101', username='admin', password='admin')
stdin, stdout, stderr = client.exec_command('list')
for line in stdout:
print '... ' + line.strip('\n')
client.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment