Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ssh handshake failed #2497

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

Closed
soEricNG opened this issue Jun 19, 2022 · 4 comments
Closed

ssh handshake failed #2497

soEricNG opened this issue Jun 19, 2022 · 4 comments

Comments

@soEricNG
Copy link

soEricNG commented Jun 19, 2022

Seeing the following error when trying to ssh to a container on my self hosted coder server. I’m able to connect to the host via the terminal on the web UI, but coder-ssh fails.
ssh conn: ssh: handshake failed: connection has failed

I’ve cleared my ssh config file to retry but that didn’t work. Could I get some pointer on how to debug this? Appreciate any help!

@ketang
Copy link
Contributor

ketang commented Jun 19, 2022

Hi @soEricNG. Can you provide the exact command you're attempting to execute? And what do you see when you run coder list? Thanks.

@soEricNG
Copy link
Author

@ketang
Here is what I see with coder ls:

xiangyus/erics-template  docker-image-builds  Running  1m          false     -                     8h (in 7h59m)

I have tried both coder ssh erics-template and ssh coder.xxxx and both did not work.

I did a bit more debugging afterward, the container itself seems OK. I'm able to connect to it via the web UI's terminal and also can ssh to it from a different Linux machine. However, I just can't ssh to it from my AMD MacBook.
From my MacBook, I can ssh to the server where the coder-server is hosted, but cannot ssh to the coder's container. I have already tried recreating ssh keys + configs and ssh-add -D, but none of that worked for me, unfortunately. Wondering if you have seen something like this?

Here is the ssh log before it errors out:

debug1: Local version string SSH-2.0-OpenSSH_8.6
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535

@ketang
Copy link
Contributor

ketang commented Jun 20, 2022

Well, then it sounds like it's something specific to the MacBook or perhaps that MacBook's network. Do you have a VPN running or anything on the server that might selectively block certain IPs? You've covered most of the factors that vary between the non-working laptop and the working Linux box, but there may be a few remaining.

@kylecarbs
Copy link
Member

I'm going to close this for now! Our #2779 issue should track it.

@kylecarbs kylecarbs closed this as not planned Won't fix, can't repro, duplicate, stale Aug 24, 2022
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

4 participants