1、用户名、密码登陆方式
import paramiko
paramiko.util.log_to_file('paramiko.log') # 记录日志文件
ssh = paramiko.SSHClient()
try:
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('139.xx.xx.xx', username='work', password='***')
cmd = 'ls' # 需要执行的Linux命名
stdin, stdout, stderr = ssh.exec_c