pahaz / sshtunnel

SSH tunnels to remote server.
MIT License
1.22k stars 184 forks source link

Local Machine is not able to connect to the tunnel #275

Open SclerA-prog opened 1 year ago

SclerA-prog commented 1 year ago

I successfully established a tunnel from remote machine to local machine. But when I am trying to connect to the tunnel using local machine. I am getting permission denied error.

from sshtunnel import SSHTunnelForwarder import time

Local machine information

local_username = 'hhhh' local_port = 22

Remote machine information

remote_username = 'eeee' remote_port = 22022 remote_host = '1.1.1.1' remote_password = 'aqerer'

server = SSHTunnelForwarder( remote_host, ssh_username=remote_username, ssh_password=remote_password, remote_bind_address=('localhost', remote_port), local_bind_address=('localhost', local_port) ) server.start()

print(server.local_bind_port) # show assigned local port

work with SECRET SERVICE through server.local_bind_port.

time.sleep(600)

server.stop()

pahaz commented 4 months ago

Could you please provide some logs?