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

SSH options not created using file-based public keys. #141

Open
r-pufky opened this issue Nov 22, 2018 · 0 comments
Open

SSH options not created using file-based public keys. #141

r-pufky opened this issue Nov 22, 2018 · 0 comments

Comments

@r-pufky
Copy link

r-pufky commented Nov 22, 2018

This is probably a complex solve.

In ssh_auth.{present|absent}, options should be included regardless of a file-based public key or a key in 'name'. However, in openssh/auth.sls, there seems to be a bug where if a static file is used, options are disabled. The behavior is not explicitly stated to be different from the ssh_auth documentation in the pillar.example. Sudo fix is here:

auth.sls.diff.txt

Patching this fixes specifying the ssh options with the key using file-based public key, however, forcing absent now fails seemingly because of a bad search/replace for key.

I suspect this is the same or a very similar issue to #140

Workaround:

Store the public key in the pillar data: openssh.auth.<key_label>.name. Example:

openssh:
  auth:
    key_label:
      - user: my_user
        present: True
        options:
          - no-X11-forwarding
          - no-port-forwarding
          - permitopen='localhost:80'
        name: <pubkey dump>
@r-pufky r-pufky changed the title SSH options not created used file-based public keys. SSH options not created using file-based public keys. Nov 22, 2018
@alxwr alxwr pinned this issue Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant