Commit de2ad0f7 authored by Michael Prokop's avatar Michael Prokop
Browse files

sshcopyid option: exit if `ssh-add -L` fails to execute

If a user requested the --sshcopyid option then it's supposed
to be run successfully, otherwise it might leave an inaccessible
system, so exit with error if execution of `ssh-add -L` fails.

While at it:

* simplify code (no need for $RC)
* don't fail if directory /root/.ssh exists already
* append keys to possibly existing /root/.ssh/authorized_keys
  file, instead of overwriting it
parent 6359370c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment