Something went wrong. Try again.
A Docker container that acts as a personal VPS running Ubuntu with ssh setup
Something went wrong. Try again.
docker-vps entrypoint.sh
389 B · 16 lines
Shell
at main
1234567891011121314151617#!/bin/bash
# Create SSH privilege separation directorymkdir -p /run/sshd
# Generate SSH host keys if they don't existif [ ! -f /etc/ssh/ssh_host_rsa_key ]; then ssh-keygen -Afi
# Fix permissions on home directory (for persistent volumes)chown -R ubuntu:ubuntu /home/ubuntu
echo "Starting SSH server..."echo "Connect with: ssh ubuntu@localhost -p 2222"exec /usr/sbin/sshd -D