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

Sessions are closed after port-forwarded connection completes #473

Open
systemmonkey42 opened this issue Sep 21, 2023 · 4 comments
Open

Comments

@systemmonkey42
Copy link

systemmonkey42 commented Sep 21, 2023

Using the latest MASTER of SSHPortal, I noticed my client connections disconnected
randomly.

It turns out the session check in pkg/bastion/ssh.go calls "conn.close" within 30 seconds of a port-forward session completing. This consistently disconnected the client.

I've commented it out for now, since it isnt clear what it achieves (the pipe() handling has already closed the session afaict).

Is there a correct way to handle those? Port forwarding is a critical feature for me.

...

@libvoid
Copy link

libvoid commented Sep 22, 2023

This bug has been introduced in this commit you cherry-picked and is not present in the latest release of the original project (which is unmaintained btw)

We faced the same issue in our fork. The fix is here but we found out the feature was not working at all so I decided to completely remove the feature.

FYI, you should maybe consider rebasing your fork on our fork which is up to date and includes multiple security improvements / fixes. Keep in mind, our fork is on MAINTENANCE mode and only security issues and major bugs will be fixed. We don't plan to add and accept new features.

@systemmonkey42
Copy link
Author

systemmonkey42 commented Sep 24, 2023

Hi @libvoid, Thanks for the tips. I'll let you know how I go.

Do you still use sshportal or is there an alternative you prefer?

EDIT: I saw in the Readme you clearly recommend Teleport. I've tried it a couple of times, but the infrastructure requirements for managing a single remote raspberry pi is a little excessive. When I get a second pi. I'll try again.

@systemmonkey42
Copy link
Author

Hi @libvoid

It didn't take much testing to prove you were correct. Thanks for pointing me in the right direction.

@libvoid
Copy link

libvoid commented Oct 16, 2023

Hi,

Sorry for the late reply

Do you still use sshportal or is there an alternative you prefer?

We still use sshportal but we plan to change. Warpgate looks promising (:crab:) but Teleport is the only alternative that is not a one-person project.

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

No branches or pull requests

2 participants