Skip to content

Commit 5129f7b

Browse files
Initial Code Uploaded.
1 parent 5988df2 commit 5129f7b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ciscorouterssh.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)