12 lines
No EOL
396 B
Bash
12 lines
No EOL
396 B
Bash
#!/bin/sh
|
|
|
|
if ! [ -f "/root/.ssh/authorized_keys" ]; then
|
|
echo "importing authorized_keys..."
|
|
mkdir -p /root/.ssh
|
|
cp /etc/ixvd/secrets/ssh/authorized_keys /root/.ssh/authorized_keys
|
|
else
|
|
if ! grep -q "# IXVD keys" /root/.ssh/authorized_keys; then
|
|
echo "importing authorized_keys..."
|
|
cat /etc/ixvd/secrets/ssh/authorized_keys >> /root/.ssh/authorized_keys
|
|
fi
|
|
fi |