Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

want to ask : cannot jump to router with debug error : DEBUG:paramiko.transport:Rejecting "[email protected]" global request from server. #315

Open
pengembaratemporer opened this issue Jan 13, 2024 · 0 comments

Comments

@pengembaratemporer
Copy link

Hi all,

I want to ssh to router via jumphost.

  1. ssh from windows ssh terminal to jumphost (linux machine) : ok
  2. SSH from jumphost to router : ok
  3. using jumpssh + netmiko: nok. Error message:
    -->
    Traceback (most recent call last):
    File "C:\Program Files\Python311\Lib\site-packages\netmiko\base_connection.py", line 1138, in establish_connection
    self.remote_conn_pre.connect(**ssh_connect_params)
    File "C:\Program Files\Python311\Lib\site-packages\paramiko\client.py", line 386, in connect
    sock.connect(addr)
    TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
    <--

our code is taken from : https://python-forum.io/thread-26866.html
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)

we modify ip and username and password.
But it cannot connect.

Enabling debug, we got :
...
INFO:paramiko.transport:Authentication (password) successful!
INFO:jumpssh.session:Successfully connected to 'jumphost:22'
DEBUG:paramiko.transport:Received global request "[email protected]"
DEBUG:paramiko.transport:Rejecting "[email protected]" global request from server.
DEBUG:paramiko.transport:EOF in transport thread
...

apparently it can connect to jumphost, but then got message : DEBUG:paramiko.transport:Rejecting "[email protected]" global request from server.

What should we do ?

thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant