Replies: 1 comment
-
If the "root" server supports port forwarding (or more specifically direct TCP/IP tunnels), you should be able to do something like: async with asyncssh.connect('root_server', 2222) as conn:
async with conn.connect_ssh('server1', 22) as conn1:
result = await conn1.run('hostname')
print(result.stdout) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a network setup , I can't assume the network structure.
I have ability to connect to 'root' server via ssh (username, password, port=2222).
server1 has connection to root
server2 has connection to server1
server3 has connection to server2
I can connect using port 22 inside network.
Want to use asyncssh package to walk through the network servers.
this is how i create connection to root server.
please advise how to create tunnel to server 1, server2, server3 etc..
I wish i can get something similar to this, but cant get it how :
Beta Was this translation helpful? Give feedback.
All reactions