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

Explorer is not responsive for newly created remote SSH Docker Context #1947

Closed
BigMorty opened this issue May 6, 2020 · 7 comments · Fixed by #1983
Closed

Explorer is not responsive for newly created remote SSH Docker Context #1947

BigMorty opened this issue May 6, 2020 · 7 comments · Fixed by #1983

Comments

@BigMorty
Copy link
Member

BigMorty commented May 6, 2020

I then tried to use the command line to SSH into the machine directly, that is when I got this prompt:

image

I answered 'yes' and the SSH connection was made. I was then able to use the Context in VS Code and the panels refreshed as expected. I found the following StackOverflow item that discuss this, it has to do with the ~/.ssh/known_hosts file.
https://stackoverflow.com/questions/3663895/ssh-the-authenticity-of-host-hostname-cant-be-established

Is there a way we can alert the user to this issue?

@bwateratmsft
Copy link
Collaborator

bwateratmsft commented May 6, 2020

@karolz-ms we should put a timeout on Dockerode requests; they shouldn't take forever...beyond 5s is unreasonable and certainly anything past 10s we can safely reject.

@bwateratmsft
Copy link
Collaborator

It looks like StrictHostKeyChecking is not enabled by default, so I'm guessing it must be a system default. There's no option we can give to ssh2 to disable it. The best we can do is a timeout error, and show a hint if it's an SSH host that it may be due to this.

That said, this issue would have existed since 0.9.0 when SSH support was first added, and nobody has raised it, so I wouldn't try to rush something into 1.2.0. @BigMorty

@karolz-ms
Copy link
Contributor

I chatted about this with @BigMorty earlier today, definitively not a 1.2.0 issue.

Disabling StrictHostkeyChecking is out of question as it pretty much opens the door wide for MITM attack.

Like @bwateratmsft said, we need a timeout for Dockerode requests, plus a user warning, plus maybe some sort of back-off for the refresh rate when things go south. This should help not only with this issue, but also with other intermittent-network-connectivity issues.

@bwateratmsft
Copy link
Collaborator

Refresh backoff might even be overkill, but I agree.

@BigMorty
Copy link
Member Author

BigMorty commented May 7, 2020

Agree not a 1.2 issue but we should do at least the timeout and message for 1.3. Can we check to see if the remote host is in the known_hosts file?

@bwateratmsft bwateratmsft added this to the 1.3.0 milestone May 7, 2020
@bwateratmsft
Copy link
Collaborator

Yes, that should work.

@bwateratmsft
Copy link
Collaborator

The fix for this is now released in 1.3.0.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants