Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import paramiko, netifaces
- netifaces.ifaddresses('eth0')
- ip=netifaces.ifaddresses('eth0')[2][0]['addr']
- ssh = paramiko.SSHClient()
- ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- ssh.connect('128.151.69.86', username='ssuizhu', password='MYTHBUSTERS1011')
- stdin, stdout, stderr = ssh.exec_command("touch "+ip)
- ssh.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement