#!/bin/bash set -e . common.sh if [ -z "$TARGET" -o ! -d "$TARGET" ]; then echo "Missing target directory" exit 1 fi mkdir $TARGET/etc/ssh/userkeys cat /etc/ssh/userkeys/root > $TARGET/etc/ssh/userkeys/root grep '^AuthorizedKeysFile /etc/ssh/userkeys' $TARGET/etc/ssh/sshd_config || echo 'AuthorizedKeysFile /etc/ssh/userkeys/%u' >> $TARGET/etc/ssh/sshd_config exit 0