Guest User

Untitled

a guest
Aug 29th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. How do you handle errors raised in paramiko? (Python)
  2. self.ssh = paramiko.SSHClient()
  3. self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  4. try:
  5. self.ssh.connect(self.hostname, username=self.username, password=self.password)
  6. except SSHException:
  7. #do something
Add Comment
Please, Sign In to add comment