Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import paramiko
- server = '172.26.56.255'
- port = 22
- user = 'openevent'
- password = 'asdfqwer'
- ssh_client = paramiko.SSHClient()
- ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- ssh_client.connect(server, username=user, password=password)
- stdin, stdout, stderr = ssh_client.exec_command('sudo ./gdm3', get_pty=True)
- stdin.write('asdfqwer\n')
- stdin.flush()
Add Comment
Please, Sign In to add comment