/ubuntu-ssh

A docker image for ubuntu linux server with ssh enabled for automation

Primary LanguageDockerfileMIT LicenseMIT

ubuntu-ssh

A docker image for ubuntu linux server with ssh enabled for automation

Currently Supported

  • linux/amd64
  • linux/arm64

Login with below credentials

$ root
$ root123

Steps

# 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

login from host

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

login from another container through Docker container IP

IPAddress=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ubuntu-ssh)
echo $IPAddress