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 files copied to wrong location #184

Closed
nerdlich opened this issue Feb 10, 2024 · 2 comments · Fixed by #185
Closed

.ssh files copied to wrong location #184

nerdlich opened this issue Feb 10, 2024 · 2 comments · Fixed by #185
Labels

Comments

@nerdlich
Copy link
Contributor

When using SFTP with public key authentication, the provided .ssh directory is copied to the wrong location:

cp -r "${SSH_CONFIG_PATH}" /root/.ssh

This creates .ssh inside /root/.ssh

This line works instead:

cp -r "${SSH_CONFIG_PATH}" /root/

@ThomDietrich
Copy link
Contributor

ThomDietrich commented Feb 10, 2024

Refers to

resticker/entrypoint

Lines 11 to 14 in 854f21e

SSH_CONFIG_PATH="/run/secrets/.ssh"
if [[ -d "$SSH_CONFIG_PATH" ]]; then
cp -r "${SSH_CONFIG_PATH}" /root/.ssh

This can happen in some circumstances. An even better way to always copy content from one folder to the other is:

cp -r "${SSH_CONFIG_PATH}/." /root/.ssh 

@djmaze
Copy link
Owner

djmaze commented Feb 17, 2024

Happily taking a PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants