summaryrefslogtreecommitdiffstats
path: root/run/run-ssh.sh
blob: 950024a20a69f5a32a66671258b5b4bbd0fed6af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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