There was an error while loading. Please reload this page.
1 parent 5988df2 commit 5129f7bCopy full SHA for 5129f7b
ciscorouterssh.py
@@ -0,0 +1,16 @@
1
+from netmiko import ConnectHandler
2
+
3
+device = {
4
+ 'device_type': 'cisco_ios',
5
+ 'ip': '192.168.5.180',
6
+ 'username': 'sampleadmin',
7
+ 'password': 'samplepass'
8
+}
9
10
+ssh_connection = ConnectHandler(**device)
11
12
+# display devices configed on router, their IP addresses, and operational statuses
13
+devinfo = ssh_connection.send_command('show ip int brief')
14
+print(devinfo)
15
16
+ssh_connection.disconnect()
0 commit comments