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

Request auto close the ssh client if the requested domain is unavailable. #174

Closed
zk-steve opened this issue Jun 18, 2021 · 5 comments · Fixed by #204
Closed

Request auto close the ssh client if the requested domain is unavailable. #174

zk-steve opened this issue Jun 18, 2021 · 5 comments · Fixed by #204
Labels
question Further information is requested

Comments

@zk-steve
Copy link
Contributor

image
I use Docker to run the tunnel but when the requested domain is unavailable it cannot auto restart because the ssh didn't auto close. Please add this feature!

@antoniomika
Copy link
Owner

Hi @sonntuet1997

So is port 8080 a previously bound tunnel? There's some funky logic to handle tunnel cleanup that you might need to verify you flags for. Could you post the flags you're using?

@antoniomika antoniomika added the question Further information is requested label Jun 26, 2021
@zk-steve
Copy link
Contributor Author

Here it is58F20B51-EA86-4534-A7B3-0483EAFBE70F

@antoniomika
Copy link
Owner

Hey @sonntuet1997

Following up on your PR here so we can have more of a discussion. Maybe we add a flag to the ssh command that tells sish to close the connection when there are 0 forwards setup for a client? Then the command to talk to sish would be like:

ssh -R 8080:localhost:8080 ssi.sh autoclose=true

@antoniomika
Copy link
Owner

With the newest release, you can either provide auto-close=true similar to the above or enable the --cleanup-unbound setting. Either of these will close an SSH session once there are no connections open. Not that auto-close will always check to see if that is the case, whereas cleanup-unbound will only close connections if they are within a certain timeout.

@zk-steve
Copy link
Contributor Author

zk-steve commented Apr 7, 2022

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants