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

Greater than 9 Public keys results in inability to delete any keys #18

Open
singlerider opened this issue Nov 30, 2017 · 0 comments
Open

Comments

@singlerider
Copy link

Using the Github public key import feature, I had 17 public keys for my user account. I tried to SSH back in and was given failure notices. After SSH-ing back in as root, then su singlerider, I tried to delete the numerous (and I thought perhaps duplicated) Public keys. To my horror, I was unable to, due to:

https://github.com/hashbang/hashbangctl/blob/master/bin/hashbangctl#L176

expecting a single string character to extract with ord(). I had to go to [email protected] -p 8893
and execute commands resembling:

docker exec -i slapd ldapmodify -D "cn=admin,dc=hashbang,dc=sh" -w $ldap_password << EOF
dn: uid=singlerider,ou=People,dc=hashbang,dc=sh
changetype: modify
delete: sshPublicKey
sshPublicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCyzIDwTLWC1PuciL09yUS/kSsM2+VGOBmiNyk3OOONDrcM04EFIjW8RzH5wsa2ERzlL2c4z+esQwlosvCg8yzJEdo3KE2d4J52CciufuKplc+nRSXsb2d6cul5iZUhzgou14bRTN0xmLlZUZeKM1jyGqpkthOhBRid+0GpLAlXReUnu+MVHSreeqtgVswmaP1RdvTPLW11enyCWW0IxfKp7RUWrDKANEQ5+aUXzY95dxwQJxbw1Rh2IbPIugaG3pPklt4cKRLYHyf30C/HlBvyy9Fm7AHnYtjNOA8OVL1MI7Pf5sW0VXXY0HnlBSd+5RItETUXl5xupmEwKHdyLadD79prHg/Z++65xAJEYF1C+BVlIqiMXrUEdPwx4VnH61KpBAicY+W5V/YJeMeeqlI9clgynPwkiPman9TGNNdXPz7Z3Q11KHHbFBFOPlkR9TGWLLy2ex+rRejhTQJlI29hbN+4wuiVs7oLursP66VEDPTNuX1aRFJwrU1JJHL3I8ipl5B5cn6NNgN8vqUBUzjMbSyRico0h9jaC4ytwpZOMtFjEeq4t0JIYXkyXjihy7sV7/sF8EaB81dTGtlcps6cZ+homdY8l/94g5Qa2/5BBFh1ZxCwkqlsgZPI5rHA1Te7sr6WuF4niUhuSGBYufmNBT1W6fk3RDeR0W2IgL7HFQ== cardno:000605649986
EOF

one-by-one, ensuring hashbangctl was NOT open on my account, as that locks its state when I run the above command.

Another interesting side-effect was that, with greater than 9 public keys, a user is unable to log in to hashbang via ssh.

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