With the usual linux tools I make a tunnel like this:
ssh -R 22:localhost:5551 login@IP Everything works with a bang. Now I want to do the same, but from under the python.
Can you explain an example:
import paramiko from sshtunnel import SSHTunnelForwarder with SSHTunnelForwarder( (REMOTE_SERVER_IP, 443), ssh_username="", ssh_pkey="/var/ssh/rsa_key", ssh_private_key_password="secret", remote_bind_address=(PRIVATE_SERVER_IP, 22), local_bind_address=('0.0.0.0', 10022) ) as tunnel: client = paramiko.SSHClient() client.load_system_host_keys() client.set_missing_host_key_policy(paramko.AutoAddPolicy()) client.connect('127.0.0.1', 10022) # do some operations with client session client.close() print('FINISH!') and whether the public key will be copied in this way (as for example it could be ssh-copy-id means)
ssh -R, which works for you? - jfs