develop csync container
This commit is contained in:
@@ -6,16 +6,18 @@ mkdir /var/run/sshd
|
||||
cd /opt
|
||||
AUTHORIZED_KEYS=/root/.ssh/authorized_keys
|
||||
DIR=`dirname "$AUTHORIZED_KEYS"`
|
||||
mkdir -p "$DIR"
|
||||
chmod 700 "$DIR"
|
||||
chown root:root "$DIR"
|
||||
pwd
|
||||
ssh-keygen -t rsa -N "" -f id_rsa
|
||||
cat /opt/id_rsa.pub >> "$AUTHORIZED_KEYS"
|
||||
mkdir -p $DIR
|
||||
chmod 700 $DIR
|
||||
cp /opt/id_rsa $DIR
|
||||
cat /opt/id_rsa.pub >> $AUTHORIZED_KEYS
|
||||
|
||||
## X11 forwarding
|
||||
apt_install_permanent xauth
|
||||
|
||||
## Configuration
|
||||
echo "ListenAddress 0.0.0.0" >> /etc/ssh/sshd_config
|
||||
|
||||
## Setup environment
|
||||
sed -i "1iexport HOME=/root" /root/.profile
|
||||
sed -i "1isource /etc/container_environment.sh" /root/.profile
|
||||
echo "export HOME=/root" >> /root/.profile
|
||||
echo "source /etc/container_environment.sh" >> /root/.profile
|
||||
Reference in New Issue
Block a user