-
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
Identity flag for logging in #1033
Comments
Might I suggest using the '-l' (lower case L) argument instead and use the '-i' to support the identity key location. This will allow existing scripts to be more easily converted from SSH to TSH. For example, currently you would type the following for SSH; Then to port a script from SSH to TSH, it would become; Or with your Ansible change; |
this looks good to me. @nikatjef I think what @kontsevoy proposes is exactly what you have just described - tsh ssh -i /home/nikatjef/.ssh/id_rsa login@host will work with Ev's proposal as well. |
@nikatjef correct, the proposed behavior is 100% compatible with OpenSSH and existing scripts. |
First part of addressing #1033 is ability to load credentials from the credentials file(s). This commit adds -i flag processing, i.e. a certificate can be fed via a cert.file and used to login.
Done. |
Problem
Currently
tsh ssh
can only use credentials obtained earlier viatsh login
. This is not convenient for robo-clients such as cron jobs, that aren't able to perform interactive logins via mechanisms like SAML.Solution: TSH side
tsh ssh
needs to support-i
flag. It would work in a way compatible with OpenSSH but also support "extended" Teleport-specific syntax, here's how it would work:Reminder:
tsh
always requires 2 bits of info to authenticate: a private key and a certificate.Syntax:
Where
identity
can be one of:identity.pem
containing the private SSH key only. This is OpenSSH-compatible mode. In this modetsh
should also look foridentity-cert.pub
file to use for logging into the Teleport proxy.identity.pem
containing both the private key concatenated with the cert (in any order). Optionally,identity.pem
may include the cluster CA as well (see [1] below). If all parts are found inside a single .pem, tsh should happily proceed to establish a connection.[1] it is possible to supply the cluster public key (for host auth) by appending it to
identity.pem
, like this:tctl auth sign --type=host >> identity.pem
. If the identity file contains cluster CA, users will not be asked to trust the proxy.Solution: TCTL side
tctl
should be able to produce both formats of "identity". Currently we have a command calledtctl auth sign
. This command must be able to produce the identity in both formats.Syntax:
This syntax should produce
identity.pem
which would contain both key+cert concatenated together.This syntax should produce the same output as before, but printed into stdout (instead of the current behavior)
When
-format=dir
flag is used withauth sign
, it should implement the current (2.1) behavior, i.e. produce 3 files under newly createdidentity
directory:The text was updated successfully, but these errors were encountered: