In certain situations when creating an authorized_key file on a Linux machine
restorecon(1) may need to be called. Therefore, attempt to run it if it exists.
MFC After: 1 week
Idea from: https://bugzilla.redhat.com/show_bug.cgi?id=739989
To help avoid confusion: when attempting to send a key file check to see if a
file of the same name exists with a '.pub' suffix and send that instead. This
mimics the behavior of other ssh-copy-id scripts.
Add -v passthrough.
Reported by: dweimer <dweimer@dweimer.net>
Reported by: feld
MFC After: 1 week
Use more portable constructs in order to allow upstream adoption
Add per-file error messages
Reviewed by: jilles
Approved by: cperciva
MFC after: 1 week
found in openssh's contrib directory.
This version has more features and is better written.
I intend to submit this upstream as well.
Reviewed by: bapt
Reviewed by: des
Approved by: cperciva
MFC after: 1 week