test
import re, time, paramiko
from datetime import datetime
from ncclient import manager
from ncclient.xml_ import to_ele
from threading import Thread
from test_config import netconf, par_dict
class sw:
def __init__(self):
self.ssh = paramiko.SSHClient()
self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
self.ssh.connect("10.1.0.6", 22, "python", "Huawei@123", allow_agent=False, look_for_keys=False)
self.vty = self.ssh.invoke_shell()
self.send_command("sc 0 te")
print("connect OK")
默认分类 2024-08-14 10:52:30 通过 网页 浏览(137)
评论已关闭!