Skip to content

Instantly share code, notes, and snippets.

@tompreston
Created February 19, 2016 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tompreston/835942eb226b38bc0995 to your computer and use it in GitHub Desktop.
Save tompreston/835942eb226b38bc0995 to your computer and use it in GitHub Desktop.
Brief example of paramiko http://docs.paramiko.org/en/1.16/
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