#!/usr/bin/env python#coding=utf-8 import paramiko, getpass,sys,traceback class ssh_utils(): def login_by_passwd(self, ip, port, username, passwd): self.ip = ip self.port = port self.username = username self.passwd = passwd self.pkey = None def login…