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

More than one connection (Connection to machine closed by remote host.) #11

Open
tomislater opened this issue Jun 16, 2021 · 3 comments

Comments

@tomislater
Copy link

Hey πŸ‘‹ great plugin! :)

It looks very promising, but I see that there are some problems if there is a one user, but with two connections.

Example:

Terminal 1:

➜ kubectl ssh-jump -i my-key.pem -u admin machine-a
using: port=22
Agent pid 31693
ssh-agent is already running
Forwarding from 127.0.0.1:2222 -> 22
Forwarding from [::1]:2222 -> 22
Handling connection for 2222
Linux machine-a 4.9.0-12-amd64 #1 SMP Debian 4.9.210-1+deb9u1 (2020-06-07) x86_64
...

Terminal 2:

➜ kubectl ssh-jump -i my-another-key.pem -u admin machine-b
using: port=22
Agent pid 31693
ssh-agent is already running
Linux machine-b 4.19.0-10-cloud-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64
...

Looks great so far, but if I log out from the machine-a:

admin@machine-a:~$ logout
Connection to machine-a closed.

It also closes a connection to machine-b

admin@machine-b:~$ Connection to 127.0.0.1 closed by remote host.
Connection to machine-b closed by remote host.
Connection to machine-b closed.

Do you have any suggestion how to deal with that problem? I can create a pod for every connection for example... But I need to edit the plugin then: https://github.com/yokawasa/kubectl-plugin-ssh-jump/blob/master/kubectl-ssh-jump#L131

I also wonder how it behaves if my whole team would want to ssh via this one pod :D I must run more tests...

Again, this plugin looks great!

@tomislater
Copy link
Author

tomislater commented Jun 24, 2021

We can use different ports and different pods for instance πŸ€”

https://github.com/tomislater/kubectl-plugin-ssh-jump/blob/master/kubectl-ssh-jump here on my fork you will find some ideas

@yokawasa
Copy link
Owner

@tomislater thank you so much for your sharing your fork!
I think your version is much simpler and better, which definitely gave me some ideas for future update πŸš€
thanks again!!

@yokawasa
Copy link
Owner

In addtion, Adding options like -o HostkeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa would work for newer ssh client scenario!!

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