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

Implement parsing for supported -o flags #2330

Closed
kontsevoy opened this issue Oct 31, 2018 · 4 comments
Closed

Implement parsing for supported -o flags #2330

kontsevoy opened this issue Oct 31, 2018 · 4 comments

Comments

@kontsevoy
Copy link
Contributor

kontsevoy commented Oct 31, 2018

For better compatibility with OpenSSH we shall consider certain subset of -o options to be passed to tsh ssh. We already have support for many and at the very least we should consider accepting and ignoring options which are on by default. The candidates include:

-o AddKeysToAgent
-o ForwardAgent
-o RequestTTY
-o StrictHostKeyChecking

Related issue: #2217

Details

-o AddKeysToAgent should be fully supported. The default behavior is "yes" but if a user specifies "no" we should NOT add keys to the agent.

-o ForwardAgent should be full supported similarly to above.

-o RequestTTY is basically an alias to -i so it should be fully supported.

-o StrictHostKeyChecking should be fully supported. This one is interesting because it makes no sense in a standard Teleport deployment (because all hosts are authenticated) but it does make sense when Teleport is used with OpenSSH (and yes, we ask a user if they trust a node).

If any other OpenSSH option is used (see man ssh) it should result in a WARNING written to stderr saying WARNING: option XXX is not supported but otherwise tsh should proceed.

If anything else (not a valid OpenSSH option) is used with -o, it should result in ERROR written to stderr saying ERROR: option XXX is not supported and tsh must exit with an error exit status/code (probably 1?)

@kontsevoy kontsevoy added this to the 3.1 "Boston" milestone Oct 31, 2018
@kontsevoy kontsevoy changed the title Implement some -o flags Implement parsing for supported -o flags Nov 1, 2018
@aaraujo-nydig
Copy link

hi @kontsevoy @russjones, did this ever got into a release? I'm trying the latest tsh version v3.1.4 and I'm getting error: unknown short flag '-o'.

@kontsevoy
Copy link
Contributor Author

@russjones re-opening because I can reproduce the problem too.

@kontsevoy kontsevoy reopened this Jan 29, 2019
@kontsevoy
Copy link
Contributor Author

@russjones also, when we figure out what's going on, let's assign it to me to update the docs? Thanks.

@kontsevoy
Copy link
Contributor Author

kontsevoy commented Jan 29, 2019

I am getting:

# This is what aaraujo-nygig sees, because -o is passed to 'tsh' instead of 'tsh ssh'
$ tsh -o ForwardAgent=yes ssh t1-master
error: unknown short flag '-o'


# does not parse ForwardAgent
$ tsh ssh -o ForwardAgent=yes t1-master
error: invalid format for option

# same issue
$ tsh ssh -o RequstTTY=yes t1-master
error: invalid format for option

For the 1st issue, it would be nice to generate a friendlier user message (maybe say "perhaps you want to use this flag as tsh ssh -o?", not sure if our command line parser allows customizing error messages for misplaced flags). For the 2nd issue it's unclear why wouldn't it work.

@russjones russjones assigned russjones and kontsevoy and unassigned russjones Jan 30, 2019
kontsevoy added a commit that referenced this issue Feb 13, 2019
- Faster docs build time due to parallel builds
- Added "agentless" entry to Q&A
- Documented -o flag support for `tsh ssh`. Closes #2330
kontsevoy added a commit that referenced this issue Feb 13, 2019
- Faster docs build time due to parallel builds
- Added "agentless" entry to Q&A
- Documented -o flag support for `tsh ssh`. Closes #2330
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants