Replace numbered build scripts with updated ones

This commit is contained in:
2014-12-26 15:04:41 +01:00
parent 86776154c8
commit 4c35d6757c
21 changed files with 34 additions and 29 deletions

26
build/scripts/sshd.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
set -e
source /build/config
set -x
## Install the SSH server
$minimal_apt_get_install openssh-server
mkdir /var/run/sshd
## Install root key
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"
## X11 forwarding
$minimal_apt_get_install xauth
## Setup environment
sed -i "1iexport HOME=/root" /root/.profile
sed -i "1isource /etc/container_environment.sh" /root/.profile