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

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

Open
SclerA-prog opened this issue Mar 17, 2023 · 1 comment
Open

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

SclerA-prog opened this issue Mar 17, 2023 · 1 comment

Comments

@SclerA-prog
Copy link

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
Copy link
Owner

pahaz commented May 12, 2024

Could you please provide some logs?

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

No branches or pull requests

2 participants