diff options
Diffstat (limited to 'mcp')
-rw-r--r-- | mcp/scripts/lib.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh index 1b439a93e..3f740589d 100644 --- a/mcp/scripts/lib.sh +++ b/mcp/scripts/lib.sh @@ -9,6 +9,11 @@ generate_ssh_key() { user=${SUDO_USER} fi + if [ -f "/tmp/${SSH_KEY}" ]; then + cp "/tmp/${SSH_KEY}" . + ssh-keygen -f "${SSH_KEY}" -y > "${SSH_KEY}.pub" + fi + [ -f "${SSH_KEY}" ] || ssh-keygen -f "${SSH_KEY}" -N '' install -o "${user}" -m 0600 "${SSH_KEY}" /tmp/ } |