#!/bin/bash service ssh start while true; do MSG=$( nc -l -p 1515 127.0.0.1 < /dev/null ) [[ "$MSG" = "exit" ]] && exit done