Skip to content
Snippets Groups Projects
Commit ec9cbf04 authored by Alan Nelson's avatar Alan Nelson
Browse files

Fix race condition on fifo creation

parent cbd7f10c
No related branches found
No related tags found
No related merge requests found
......@@ -7,4 +7,4 @@
#
read -p 'Service Account: ' account
sudo -u "$account" -H -- bash -c "cd ~; rm -f key key.pub; mkfifo key key.pub && cat key && cat key.pub >> /etc/ssh/authorized_keys/$account & echo \"y\" | ssh-keygen -q -t ed25519 -N \"\" -f key &>/dev/null; rm -f key key.pub"
sudo -u "$account" -H -- bash -c "cd ~; rm -f key key.pub; mkfifo key key.pub; cat key && cat key.pub >> /etc/ssh/authorized_keys/$account & echo \"y\" | ssh-keygen -q -t ed25519 -N \"\" -f key &>/dev/null; rm -f key key.pub"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment