diff options
author | Jakub Jelen <jjelen@redhat.com> | 2020-09-29 12:00:01 +0200 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2021-02-25 15:06:15 +0100 |
commit | 333e25f7bc43cee6e36f766e39dad6f9918b318c (patch) | |
tree | 2c63e05166b7c4d6dc0d6eb29502948b2792af83 /contrib/ssh-copy-id | |
parent | upstream: s/PubkeyAcceptedKeyTypes/PubkeyAcceptedAlgorithms/ (diff) | |
download | openssh-333e25f7bc43cee6e36f766e39dad6f9918b318c.tar.xz openssh-333e25f7bc43cee6e36f766e39dad6f9918b318c.zip |
restorecon the correct directory
if using different path for authorized_keys file
SSH-Copy-ID-Upstream: 791a3df47b48412c726bff6f7b1d190721e65d51
Diffstat (limited to 'contrib/ssh-copy-id')
-rw-r--r-- | contrib/ssh-copy-id | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id index cd1835c1e..3105e78be 100644 --- a/contrib/ssh-copy-id +++ b/contrib/ssh-copy-id @@ -256,7 +256,7 @@ installkeys_sh() { cat >> ${AUTH_KEY_FILE} || exit 1; if type restorecon >/dev/null 2>&1; then - restorecon -F .ssh ${AUTH_KEY_FILE}; + restorecon -F $(dirname "${AUTH_KEY_FILE}") ${AUTH_KEY_FILE}; fi EOF ) |