-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Access agentless nodes using hostname with ssh
as client
#31281
Comments
ssh
ssh
ssh
as client
@lxea @capnspacehook Shouldn't agentless mode support dialing by hostname? Is there a bug? |
@marcoandredinis What happens if you try to connect using |
I'll try that as well
|
New set up (just to ensure I didn't messed up previously, or I did it twice 😅 ) Cluster
Logs when I try to connect to connect using
I edited the
|
The same happens when accessing the Nodes in a leaf cluster, using a login in root cluster |
I was able to connect to an agentless leaf node by passing an explicit port to tsh --
However subsequent re-connections says the remote host key has changed for some reason
|
I can confirm the exact same behaviour 👍 |
I can connect okay when using an agentless node on a local cluster like The port being required to be passed seems to be expected acording to the guide https://goteleport.com/docs/server-access/guides/openssh/#step-33-connect-to-your-sshd-host however when connecting to a node on a leaf cluster you seem to be expected to include |
@marcoandredinis @lxea @capnspacehook Is this a regression in behavior compared to v13 and v12? |
I'm getting the same thing using v13:
V12 seems to have a different onboarding flow |
@marcoandredinis Yeah can you please check v12 as well, the client experience shouldn't have really changed with agentless to my knowledge, just how you register the server with the cluster. |
I might be missing something but can you actually register a node in v12? In the sense that it actually appears as a Teleport resource. I followed this guide https://goteleport.com/docs/ver/12.x/server-access/guides/openssh/ but you don't end up with a node registration (as in, you don't see it when list servers in UI/cli). As a summary, I think the issue is that, given that you can do Using a single cluster everything works if you pass the port in the For trusted clusters, if you try to access a node in a leaf cluster using
|
OpenSSH nodes can't be registered pre v13, that's right. I'm assuming @r0mant just meant connecting to OpenSSH nodes with I can repro the host key changing bug on a remote cluster though. |
I got curious about this Issue after reading @capnspacehook's status so I took a look as well. It looks like the agentless node public key exchange is passing the root cluster's Host CA instead of the leaf cluster's. I suspect this is because we are connecting to the leaf cluster through the root Proxy. In the example below, you can see agentless nodes from both leaf and root pass the root cluster's ssh public key -
If you update the Root CA entry in
A better workaround is to jumphost through the leaf cluster proxy. Here's a scuffed example, it'd be cleaner using Proxy Templates:
|
The issue of the proxy connections presenting a certificate signed by the root rather than the leaf for an agentless node is still occurring as of test plan v15. In addition, the wrong cluster name is used for the principals - leading to the
|
Moving discussion of the cert issues to #36801 Closing this issue as the original reported problem is resolved (it was an issue with the port number) |
Expected behavior:
Doing
tsh ssh <user>@<host>
should be the same as doingssh <user>@<host>.<cluster>
after correctly configuring ssh client.Current behavior:
✅
tsh ssh root@ip-172-31-24-131
❌
ssh [email protected]
After doing
tctl nodes ls
we get the node's name and tryssh
client again:✅
ssh [email protected]
Bug details:
This is also valid for remote clusters
Trying to access a Node in a Agentless Node using
ssh
failsThe text was updated successfully, but these errors were encountered: