该 Docker 镜像基于 Ubuntu 20.04.6 LTS,包含一个用于远程访问的 SSH 服务器。
147
首先,从 Docker Hub 拉取您的镜像:
docker pull jeremy0124/ubuntu-ssh:v3
使用以下命令运行容器,并将端口 2222 映射到主机,以便通过 SSH 访问:
docker run --platform linux/amd64 -d --name x86_ubuntu -v /Users/jeremy/Ubuntu:/root -p 2222:22 jeremy0124/ubuntu-ssh:v3
步骤 3:通过 SSH 连接到容器
使用以下命令通过 SSH 连接到容器:
ssh [email protected] -p 2222
系统会提示您输入密码。使用预定义的密码 1 登录。
Content type
Image
Digest
sha256:582e160cc…
Size
241.4 MB
Last updated
almost 2 years ago
docker pull jeremy0124/ubuntu-ssh:v3