diff --git a/usr.bin/ssh-copy-id/ssh-copy-id.sh b/usr.bin/ssh-copy-id/ssh-copy-id.sh index 789fbe62b882..e16cfaa8456a 100755 --- a/usr.bin/ssh-copy-id/ssh-copy-id.sh +++ b/usr.bin/ssh-copy-id/ssh-copy-id.sh @@ -46,6 +46,9 @@ sendkey() { printf "$alg $key $comment\n" >> "$keyfile" ; \ fi ; \ done \ + if [ -x /sbin/restorecon ]; then \ + /sbin/restorecon -F "$HOME/.ssh/" "$keyfile" >/dev/null 2>&1 || true ; \ + fi '\' }