threefoldtecharchive / jumpscaleX_threebot

Apache License 2.0
0 stars 3 forks source link

flist used for ubuntu solution should not install openssh at startup #719

Closed zaibon closed 4 years ago

zaibon commented 4 years ago

It seems the startup script of the flist used for the ubuntu soltion (https://hub.grid.tf/tf-bootable/ubuntu:18.04-r1.flist) is

#!/bin/sh

apt-get update
mkdir ~/.ssh
mkdir -p /var/run/sshd
chmod 700 ~/.ssh
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
echo $pub_key >> ~/.ssh/authorized_keys
apt-get install -y openssh-server
chmod 600 /etc/ssh/ssh_host_*
exec /usr/sbin/sshd -D

There is really no reason to install openssh-server every time a container start. Just include it into the flist. The chmod calls can also be done when you build the flist. SO the enrtrypoint of this flist could just be

#!/bin/sh

apt-get update
mkdir ~/.ssh
echo $pub_key >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
exec /usr/sbin/sshd -D
BolaNasr commented 4 years ago

ubuntu 18.04 -> https://hub.grid.tf/tf-bootable/3bot-ubuntu-18.04.flist ubuntu 19.10 -> https://hub.grid.tf/tf-bootable/3bot-ubuntu-19.10.flist ubuntu 20.04 -> https://hub.grid.tf/tf-bootable/3bot-ubuntu-20.04.flist

and add those versions in ubuntu chat https://github.com/threefoldtech/jumpscaleX_threebot/commit/dec7788d914cd7047f49cff32c060474a560a186

AhmedHanafy725 commented 4 years ago

Verified

image

image

image