-
Notifications
You must be signed in to change notification settings - Fork 838
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
Multiple keys are added to authorized_keys without line breaks #283
Comments
We have the same issue. A manual insertion of a line break in the /home/username/.ssh/authorized_keys file between the keys has solved the login issue. |
Same issue here, building a Helm chart using this base image and running into the issue. Helm strips out any whitespaces so its even more difficult to add them in. Confirming this is an issue so I will look at the code to submit a PR if I can make the time today. |
I have a working fix that forces a new line with this proposed change. Does anyone see any concerns with this update? Suggested fix: echo -e "$(cat "$publickey")" >> "$userKeysAllowedFileTmp" Existing read and append code: Lines 89 to 91 in 302390e
|
@jalleyne i needed to build the image from repo because there is no ARM image in Docker hub. I can confirm that your change fixed the key files error that was causing container to fail on init. Thank you. It works with the latest alpine |
For anyone else hitting this when deploying via config map here is a hack that allows multiple public keys to be supplied.
|
I am running atmoz/sftp:alpine in Azure Container Instances.
I have two RSA public keys for the same user, which are mounted as a secret volume into /home/username/.ssh/keys
The file /home/username/.ssh/authorized_keys does contain both keys once the container is running but without a line break between them, which causes key auth to fail.
I have tried adding a single line break to the end of the secrets in the volume definition but it didn't make a difference.
The text was updated successfully, but these errors were encountered: