Skip to content

ssh handshake failed #2497

Closed as not planned
Closed as not planned

Description

@soEricNG

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!

Activity

  1. ketang commented on Jun 19, 2022

    @ketang
    Contributor

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

  2. soEricNG commented on Jun 20, 2022

    @soEricNG
    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
    
  3. ketang commented on Jun 20, 2022

    @ketang
    Contributor

    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.

  4. kylecarbs commented on Aug 24, 2022

    @kylecarbs
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions