diff options
Diffstat (limited to 'run/run-ssh.sh')
-rw-r--r-- | run/run-ssh.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/run/run-ssh.sh b/run/run-ssh.sh new file mode 100644 index 0000000..950024a --- /dev/null +++ b/run/run-ssh.sh @@ -0,0 +1,13 @@ +#! /bin/bash + +set -o errexit + +port="$(($(id -u) - 900))22" + +echo "Running on the port $port" +echo "Create ssh tunnel and connect:" +echo " ssh -L $port:localhost:$port $(hostname)" +echo " and connect locally " +echo " ssh -p $port localhost" + +podman run --name "ccpi-run" -it --rm --hooks-dir /usr/share/containers/oci/hooks.d/ -p ${port}:2222/tcp -v ~/ccpi/data:/ccpi/data localhost/ccpi /usr/sbin/sshd -D -p 2222 |