Kali container on ssh Reference : https://github.com/airman604/misc/blob/master/Dockerfile
343
#Reference : https://github.com/airman604/misc/blob/master/Dockerfile
FROM kalilinux/kali-rolling
ENV DEBIAN_FRONTEND noninteractive
# do APT update
RUN apt-get -y update && apt-get -y dist-upgrade && apt-get -y autoremove && apt-get clean
# install Kali Linux "Top 10" metapackage and a couple "nice to have" tools
RUN apt-get -y install kali-linux-core kali-tools-exploitation openssh-server sudo
# Any additional packages add here donot update above list
RUN apt-get -y install iputils-ping python nano
COPY bashrc /root/.bashrc
# initialize Metasploit databse
RUN service postgresql start && msfdb init && service postgresql stop
# Mandatory initialization steps for having the SSH Deamon running
RUN mkdir -p /var/run/sshd \
&& touch /root/.Xauthority \
&& true
# Changing password of root user to toor and allowing ssh
RUN echo "root:toor" | chpasswd \
&& sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config \
&& service ssh restart
## SSH Port
EXPOSE 22
## Reverse Shell Port
EXPOSE 4444
# WORKDIR /root
CMD /usr/sbin/sshd -D
Content type
Image
Digest
Size
1 GB
Last updated
over 5 years ago
docker pull rohitnss/kali