Created
September 30, 2012 06:59
-
-
Save apackeer/3806106 to your computer and use it in GitHub Desktop.
paramiko example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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