Create the user's authorized_keys file if it does not exist

Closes #2469
This commit is contained in:
Jose Diaz-Gonzalez
2016-11-21 19:08:33 -07:00
parent 970647b4ae
commit 4e25639de4
2 changed files with 6 additions and 0 deletions

View File

@@ -16,3 +16,8 @@ verify_ssh_key_exists() {
declare desc="Test that public key exists"
[[ -e ${DOKKU_ROOT}/.ssh/authorized_keys ]] || dokku_log_fail "No public keys found."
}
create_ssh_key_file() {
declare desc="Ensure the public key file exists"
touch "${DOKKU_ROOT}/.ssh/authorized_keys"
}