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

Ensure temp files are cleaned up

parent 2afb8953
Branches
No related tags found
No related merge requests found
...@@ -7,4 +7,4 @@ ...@@ -7,4 +7,4 @@
# #
read -p 'Service Account: ' account read -p 'Service Account: ' account
sudo -u "$account" -H -- bash -c "cd ~; 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 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"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment