Sign inSign up

jinzishuai/bastion

By jinzishuai

•Updated over 5 years ago

Ubuntu server OS used as a jumpbox. SSH (tcp/22) is open.

Image
0

681

jinzishuai/bastion repository overview

Remember to run with -d:

$ docker run -d --rm --name ubuntu bastion 
4d5dfb5e1c1b799ebacb34249624f92e50464ae67e055d1b4a359ae6413fd752

We can see the SSH is listening on port 22:

$ docker exec -it ubuntu /bin/bash
root@4d5dfb5e1c1b:/# netstat -lptn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1/sshd: /usr/sbin/s 
tcp6       0      0 :::22                   :::*                    LISTEN      1/sshd: /usr/sbin/s 
root@4d5dfb5e1c1b:/# ps x
    PID TTY      STAT   TIME COMMAND
      1 ?        Ss     0:00 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
      6 pts/0    Ss     0:00 /bin/bash
     15 pts/0    R+     0:00 ps x
root@4d5dfb5e1c1b:/# 

Tag summary

Content type

Image

Digest

Size

141 MB

Last updated

over 5 years ago

docker pull jinzishuai/bastion:v2