Skip to content

Instantly share code, notes, and snippets.

View YMont's full-sized avatar

YMont

  • Taiwan
View GitHub Profile
@YMont
YMont / main.py
Last active March 24, 2021 07:41
netmiko-basic
import netmiko #帶入模組
from netmiko import ConnectHandler #將Netmiko模組的ConnectHandler連線函式帶入
def speed_change(param): #函式定義
print("Please wait seconds. Connecting … \n") #作為等待過程
my_device = { #利用Python字典對應的鍵與值代入路由器
"host": "xxx.xxx.xxx.xxx", #輸入路由器的IP Address
"username": "xxx", #輸入使用者名稱
"password": "xxx", #輸入密碼
"device_type": "cisco_ios"} #輸入路由器的IOS type