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

0.17: ssh_auth adds ssh-rsa key to authorized_keys even though type is set to ecdsa #7718

Closed
Mrten opened this issue Oct 9, 2013 · 5 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists

Comments

@Mrten
Copy link
Contributor

Mrten commented Oct 9, 2013

This is from state.show_highstate():

 sshpubkey-mailbackup-root@backup-2:
        ----------
        __env__:
            base
        __sls__:
            virtual-users
        ssh_auth:
            ----------
            - name:
                AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbm...
            ----------
            - enc:
                dsa-sha2-nistp256
            ----------
            - comment:
                root@backup-2
            ----------
            - user:
                mailbackup
[...]

It shows enc to be of type ecdsa. However, it blindly puts ssh-rsa in the authorized_keys file...

no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa AAAA...

@Mrten
Copy link
Contributor Author

Mrten commented Oct 9, 2013

Ahh.. copy/paste typo, I missed the 'ec' in front of the 'ecdsa'.
Can we please error out instead of resetting to a wrong default which sends you on a wild wild goose chase because ssh only logs an error that vaguely hints at this problem in DEBUG3 mode?

@basepi
Copy link
Contributor

basepi commented Oct 10, 2013

Yes, we should definitely tighten this process up, don't want to just fall back on a different key because of a typo. (Assuming I understood your problem right)

@Mrten
Copy link
Contributor Author

Mrten commented Oct 11, 2013

The problem is that the key gets mangled, it says ssh-rsa in authorized_keys but is of course followed by an ECDSA pubkey. Which won't ever work but is entirely unobvious so will take hours to debug.

@basepi
Copy link
Contributor

basepi commented Oct 11, 2013

What, you can't tell the keys apart by sight? ;)

We'll get this fixed.

@ghost ghost assigned cro Oct 14, 2013
@cro
Copy link
Contributor

cro commented Oct 15, 2013

Fixed in #7850

@cro cro closed this as completed Oct 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists
Projects
None yet
Development

No branches or pull requests

3 participants