Error when following tutorial: "ssh_exchange_identification: Connection closed by remote host"

Hello! First of all, super exciting product!

I came across an error while I was following along the getting started tutorial step-by-step. While trying to perform the boundary connect ssh -target-id ttcp_1234567890 command connection is closed:

➜  ~ boundary connect ssh -target-id ttcp_1234567890
ssh_exchange_identification: Connection closed by remote host

The error on the boundary server is:

2020-10-15T10:03:48.289+0200 [INFO]  controller.worker-handler: session activated: session_id=s_UqJbwXyxUy target_id=ttcp_1234567890 user_id=u_1234567890 host_set_id=hsst_1234567890 host_id=hst_1234567890
2020-10-15T10:03:48.306+0200 [INFO]  controller.worker-handler: authorized connection: session_id=s_UqJbwXyxUy connection_id=sc_n4WOGfHSlK connections_left=0
2020-10-15T10:03:48.307+0200 [ERROR] worker: error dialing endpoint: error="dial tcp [::1]:22: connect: connection refused" endpoint=tcp://localhost:22
2020-10-15T10:03:48.333+0200 [INFO]  controller.worker-handler: connection closed: connection_id=sc_n4WOGfHSlK

The docs are not clear whether you need to provide your own target for this step?


1 Like

This is a ssh connection to localhost, so it is related to your ssh configuration.

See this one: Unable to connect to target

1 Like

You can list the sessions using

boundary sessions list -scope-id p_1234567890

Grap the id and read the session:

boundary sessions read -id <your id her>

For me it was the following:

Termination Reason:   connection limit

It looks like you configured the host to have an IPv6 address, can you verify that SSH is listening on that address and it’s not firewalled?