Netmiko Program ssh from the Jumpssh ( host -> Jumphost -> Network Device - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Networking (https://python-forum.io/forum-12.html) +--- Thread: Netmiko Program ssh from the Jumpssh ( host -> Jumphost -> Network Device (/thread-26866.html) |
Netmiko Program ssh from the Jumpssh ( host -> Jumphost -> Network Device - matya0403 - May-16-2020 I am getting error like below TypeError: 'TerminalServerSSH' object is not callable from netmiko import ConnectHandler from getpass import getpass from jumpssh import SSHSession device = { 'device_type': 'terminal_server', 'host': '192.168.64.5', 'username': 'admin', 'password': getpass(), 'ssh_config_file': './ssh_config', } ESW1 = { 'device_type': 'cisco_ios', 'host': '192.92.34.61', 'username': 'cisco', 'password': getpass(), 'ssh_config_file': './ssh_config', } net_connect = ConnectHandler(**device) remote_connect = net_connect(**ESW1).open() output = remote_connect.send_command("show ip int brief | in up") print(output) RE: Netmiko Program ssh from the Jumpssh ( host -> Jumphost -> Network Device - micseydel - May-28-2020 You need to provide the full stack trace, not just a small part of it. RE: Netmiko Program ssh from the Jumpssh ( host -> Jumphost -> Network Device - matya0403 - May-29-2020 @ micseydel. what does it mean full stack trace ? RE: Netmiko Program ssh from the Jumpssh ( host -> Jumphost -> Network Device - dtw - Jul-31-2020 This is my code and works for me, I use it to connect to my 7x50 Nokia Router/Alcatel through Jump Server from netmiko import ConnectHandler from jumpssh import SSHSession targetnode = { 'device_type': 'alcatel_sros', 'ip': 'targed_node', 'username': 'admin', 'password': 'admin', 'port': 22, } jh_session = SSHSession('jumpserver_ip','jumpserver_user',password='jumpserver_passwd').open() remote_connect = ConnectHandler(**targetnode) output = remote_connect.send_command("show router interface") print(output) |