Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
if [[ -n $PASS_SSH ]]
then
apt-get install -y ssh
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && (echo $PASS_SSH; echo $PASS_SSH) | passwd root
service ssh start
fi
if [[ -n $SSH_KEY ]]
then