mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
15 lines
594 B
Bash
Executable File
15 lines
594 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
|
|
verify_ssh_key_file() {
|
|
declare desc="Test that public key is valid"
|
|
[[ -s ${DOKKU_ROOT}/.ssh/authorized_keys ]] || dokku_log_fail "No public keys found."
|
|
ssh-keygen -l -f "${DOKKU_ROOT}/.ssh/authorized_keys" &> /dev/null || dokku_log_fail "${DOKKU_ROOT}/.ssh/authorized_keys failed ssh-keygen check."
|
|
}
|
|
|
|
verify_ssh_key_exists() {
|
|
declare desc="Test that public key exists"
|
|
[[ -e ${DOKKU_ROOT}/.ssh/authorized_keys ]] || dokku_log_fail "No public keys found."
|
|
}
|