Issue
Currently, a Unix host is connected using PuTTY which is inside the Windows Jump host. User logins to the windows jump box by providing username and password (Remote desktop connection). I referred to this question Nested SSH using Python Paramiko and tried to replace it with Jump box IP. Below is the piece of code
vm = paramiko.SSHClient()
vm.set_missing_host_key_policy(paramiko.AutoAddPolicy())
vm.connect('10.x.x.172', username='******SA', password='Jul@2021')
print('success')
I am getting the below error while the connection
WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because the connected host has failed to respond
From this below code what are the dest_addr
and local_addr
, from where I fetch this address?
dest_addr = ('10.103.53.26', 22) #edited#
local_addr = ('192.168.115.103', 22) #edited#
vmchannel = vmtransport.open_channel("direct-tcpip", dest_addr, local_addr)
Solution
If you are using Remote desktop connection to connect to the jump host, it's no surprise that you cannot connect with SSH.
- You have to use a different API that your jump hosts supports, like PowerShell remoting or similar.
- Or setup an SSH server on the jump host.
Answered By - Martin Prikryl Answer Checked By - Gilberto Lyons (WPSolving Admin)