Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import paramiko
- def start_connection():
- u_name = 'root'
- pswd = ''
- port = 22
- r_ip = '198.x.x.x'
- sec_key = '/mycert.ppk'
- myconn = paramiko.SSHClient()
- myconn.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- my_rsa_key = paramiko.RSAKey.from_private_key_file(sec_key)
- session = myconn.connect(r_ip, username =u_name, password=pswd, port=port,pkey=my_rsa_key)
- ...
- ...
- follow python code to perform some actions on remote machine.
- ImportError: No module named asn1crypto.algos
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement