Miroca_Server
This commit is contained in:
15
api/mikrotik/total.py
Normal file
15
api/mikrotik/total.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import netmiko
|
||||
from netmiko import ConnectHandler
|
||||
|
||||
mikrotik_router_1 = {
|
||||
'device_type': 'mikrotik_routeros',
|
||||
'host': '192.168.10.1',
|
||||
'port': '2202',
|
||||
'username': 'server',
|
||||
'password': 'Cbvgcjy0V'
|
||||
}
|
||||
|
||||
sshCli = ConnectHandler(**mikrotik_router_1)
|
||||
print(sshCli.find_prompt())
|
||||
output = sshCli.send_command("/interface ethernet print")
|
||||
print(output)
|
||||
Reference in New Issue
Block a user