ssh to udocker

Preparation

Run for installations

Change password

Rerun and ssh

Preparation

For any problem with containers, especially about installations, please check udocker manual or contact us here

Create a container

cd /home/<YOUR-COURSE/LAB-PATH>

setenv UDOCKER_DIR /home/<YOUR-COURSE/LAB-PATH>

udocker pull ubuntu:20.10

udocker create --name=ssh-container ubuntu:20.10
 

(Go to top)

Run for installations

 

udocker setup --execmode=P2 ssh-container

udocker run --containerauth ssh-container

 

Inside the container, install

export DEBIAN_FRONTEND=noninteractive

apt update && apt upgrade -y

apt install nano less git wget build-essential python3.8 python3.8-dev vim -y

apt install libssl-dev dropbear
 

(Go to top)

Change password

 

passwd root

Give a password as you wish - keep it for connecting afterwards. before the next step, exit the container:

exit

 

(Go to top)

Rerun and ssh

Rerun with an open port:

udocker run --hostauth --publish=4444:2222 --volume=/usr/local:/mnt/local ssh-container

dropbear -E -R -a -p 2222 -P ./dbearPID

ssh to the container:

From *outside* the container, you can now ssh to the container: 

ssh root@<container-host-machine>.cs.tau.ac.il -p 4444
Enter the password you chose and you will get into the container.
 

(Go to top)