Replace numbered build scripts with updated ones
This commit is contained in:
26
build/scripts/sshd.sh
Normal file
26
build/scripts/sshd.sh
Normal 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
|
||||
Reference in New Issue
Block a user