Docker SSH ubuntu

Accessing Ubuntu Docker Container via SSH

This article introduces how to SSH into Ubuntu in Docker. I just wrote an article about this recently, but it didn't work with 18.04, so I looked into it. It seems there's an image available, and using this is faster.

Shou Arisaka
1 min read
Nov 6, 2025

This article introduces how to SSH into Ubuntu in Docker.

I just wrote an article about this recently, but it didn’t work with 18.04, so I looked into it. It seems there’s an image available, and using this is faster.

docker run -d -P --name ubuntu18.04_sshd -v /media/ownCloud/pg/docker/mnt/:/docker rastasheep/ubuntu-sshd:18.04
docker port ubuntu18.04_sshd 22 # e.g. 0.0.0.0:49154
ssh root@localhost -p <PORTNUM> # password is `root`

Share this article

Shou Arisaka Nov 6, 2025

🔗 Copy Links