A docker image for ubuntu linux server with ssh enabled for automation
- linux/amd64
- linux/arm64
$ root
$ root123
# From ghcr, only linux/amd64 available
docker pull ghcr.io/arumugamsubramanian/ubuntu-ssh:main
docker run -d --rm --name ubuntu-ssh -p 2222:22 ghcr.io/arumugamsubramanian/ubuntu-ssh:main
# From Docker Hub
docker pull arumugamsubramanian/ubuntu-ssh:main
# I use kind k8s cluster
docker run -d --rm --network="kind" --name ubuntu-ssh -p 2222:22 arumugamsubramanian/ubuntu-ssh:main
ssh root@localhost -p 2222
if you are facing any issues related to known hosts, delete the older rsa key
cat /Users/arumugamsubramanian/.ssh/known_hosts | nl
IPAddress=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ubuntu-ssh)
echo $IPAddress