Skip to content

Teleport over ssh via identity file #7278

Answered by webvictim
igtsekov asked this question in Q&A
Discussion options

You must be logged in to vote

tsh ssh isn't designed to be used directly as a ProxyCommand because it does more than just forward stdin/stdout (which is what a ProxyCommand expects).

You should be able to use ssh itself directly with its proxy subsystem:

Host <IP>
  User <user>
  Port 3022
  IdentityFile file.pem
  ProxyCommand ssh <proxy> -s proxy:%h:%p

Host <proxy>
  User <user>
  Port 3023
  IdentityFile file.pem

At this point, ssh <IP> by itself on the command line should work and can be used by Ansible/other tools which expect an ssh transport.

Replies: 1 comment 29 replies

Comment options

You must be logged in to vote
29 replies
@igtsekov
Comment options

@webvictim
Comment options

@igtsekov
Comment options

@webvictim
Comment options

@igtsekov
Comment options

Answer selected by webvictim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants