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

v13 Agentless/OpenSSH guide doesn't work #24778

Closed
nklaassen opened this issue Apr 18, 2023 · 3 comments · Fixed by #26925
Closed

v13 Agentless/OpenSSH guide doesn't work #24778

nklaassen opened this issue Apr 18, 2023 · 3 comments · Fixed by #26925
Assignees
Labels
agentless bug OpenSSH For customers using Teleport and OpenSSH test-plan-problem Issues which have been surfaced by running the manual release test plan

Comments

@nklaassen
Copy link
Contributor

Expected behavior:

Following the agentless/OpenSSH guide (https://goteleport.com/docs/ver/13.x/server-access/guides/openssh/) I should be able to connect to OpenSSH nodes via Teleport.

Current behavior:

The first problem is that ADDR first gets set to a list of values ADDR=1.2.3.4,openssh-node,a100fdd0-52db-4eca-a7ab-c3afa7a1564a, and then later is used in the ssh command which doesn’t accept a list ssh -p ${PORT?} -F ssh_config_teleport "${USER?}@${ADDR?}.${CLUSTER?}"

The second problem I hit after setting the addr in the ssh command to just the IP, hostname, or UUID, is this generic error:

$ ssh -p ${PORT?} -F ssh_config_teleport "${USER?}@nic-test.${CLUSTER?}"
ERROR: ssh: subsystem request failed

kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535

I get this log on the proxy:

2023-04-18T16:14:31-07:00             ERRO failure handling SSH "subsystem" request error:[
ERROR REPORT:
Original Error: *trace.BadParameterError cluster is empty
Stack Trace:
        github.com/gravitational/teleport/api@v0.0.0/client/client.go:865 github.com/gravitational/teleport/api/client.(*Client).GenerateOpenSSHCert
        github.com/gravitational/teleport/lib/agentless/agentless.go:79 github.com/gravitational/teleport/lib/agentless.createAuthSigner
        github.com/gravitational/teleport/lib/agentless/agentless.go:51 github.com/gravitational/teleport/lib/agentless.SignerFromSSHCertificate.func1
        github.com/gravitational/teleport/lib/proxy/router.go:280 github.com/gravitational/teleport/lib/proxy.(*Router).DialHost
        github.com/gravitational/teleport/lib/srv/regular/proxy.go:270 github.com/gravitational/teleport/lib/srv/regular.(*proxySubsys).proxyToHost
        github.com/gravitational/teleport/lib/srv/regular/proxy.go:237 github.com/gravitational/teleport/lib/srv/regular.(*proxySubsys).Start
        github.com/gravitational/teleport/lib/srv/regular/sshserver.go:1807 github.com/gravitational/teleport/lib/srv/regular.(*Server).handleSubsystem
        github.com/gravitational/teleport/lib/srv/regular/sshserver.go:1558 github.com/gravitational/teleport/lib/srv/regular.(*Server).dispatch
        github.com/gravitational/teleport/lib/srv/regular/sshserver.go:1517 github.com/gravitational/teleport/lib/srv/regular.(*Server).handleSessionRequests
        runtime/asm_amd64.s:1598 runtime.goexit
User Message: cluster is empty] regular/sshserver.go:2018

Bug details:

  • Teleport version: v13.0.0-alpha.1
  • Recreation steps:
    • follow the OpenSSH guide. I'm using an Amazon Linux instance for the node and running the Teleport cluster locally on my MacBook.
  • Debug logs: above
@nklaassen nklaassen added bug test-plan-problem Issues which have been surfaced by running the manual release test plan OpenSSH For customers using Teleport and OpenSSH agentless labels Apr 18, 2023
@capnspacehook
Copy link
Contributor

Opened a PR for a fix for that behavior, the docs probably need correcting so a different environmental variables are used instead of just ADDR. Using a different env var on my branch works for me.

@stevenGravy
Copy link
Contributor

I'd say most people would not use a IP address too. We now have teleport join openssh so would expect we'd include that.

@r0mant
Copy link
Collaborator

r0mant commented May 18, 2023

@capnspacehook Can you please verify this is fixed now and close the ticket if so?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agentless bug OpenSSH For customers using Teleport and OpenSSH test-plan-problem Issues which have been surfaced by running the manual release test plan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants