Created
February 19, 2016 11:24
-
-
Save tompreston/835942eb226b38bc0995 to your computer and use it in GitHub Desktop.
Brief example of paramiko http://docs.paramiko.org/en/1.16/
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
import paramiko | |
if __name__ == '__main__': | |
ssh = paramiko.SSHClient() | |
# important line if you've never logged into the machine before | |
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
ssh.connect('192.168.0.10', username='pi', password='raspberry') | |
ssh.exec_command('touch /tmp/sshisawesome') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment