nnn
This commit is contained in:
@@ -39,7 +39,12 @@ if [[ -z "${HOST}" || -z "${USER}" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SSH_OPTS=(-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null)
|
||||
SSH_OPTS=()
|
||||
if [[ "${PI_CONTROL_STRICT_HOSTKEY:-}" == "1" ]]; then
|
||||
SSH_OPTS=(-o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=/root/.ssh/known_hosts)
|
||||
else
|
||||
SSH_OPTS=(-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null)
|
||||
fi
|
||||
|
||||
if [[ "${AUTH_TYPE}" == "key" && -n "${KEY_PATH}" ]]; then
|
||||
exec ssh "${SSH_OPTS[@]}" -i "${KEY_PATH}" -p "${PORT:-22}" "${USER}@${HOST}"
|
||||
|
||||
Reference in New Issue
Block a user