mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
17 lines
373 B
Bash
17 lines
373 B
Bash
#!/bin/sh
|
|
|
|
USERNAME=commander
|
|
|
|
if ! id -u ${USERNAME} >/dev/null 2>&1; then
|
|
adduser --disabled-password --gecos '' --shell /bin/zsh ${USERNAME} && \
|
|
find / -name ".gitkeep" -type f -exec rm -f {} +
|
|
|
|
PUB_KEY=/etc/ssh/authorized_keys/${USERNAME}
|
|
cp /ssh_key.pub ${PUB_KEY}
|
|
chmod 644 ${PUB_KEY}
|
|
fi
|
|
|
|
mkdir -p /run/sshd
|
|
echo "Starting SSH server"
|
|
/usr/sbin/sshd -D -e
|