sshd centos 8
This commit is contained in:
parent
23cd5cd2ac
commit
1212ee1265
16
sshd/centos/8.0/Dockerfile
Normal file
16
sshd/centos/8.0/Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
FROM centos:8
|
||||
|
||||
MAINTAINER Yang <yangyufans@qq.com>
|
||||
|
||||
RUN yum install -y passwd openssl openssh-server openssh-clients
|
||||
|
||||
RUN ssh-keygen -q -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N '' && \
|
||||
ssh-keygen -q -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N '' && \
|
||||
ssh-keygen -t dsa -f /etc/ssh/ssh_host_ed25519_key -N ''
|
||||
|
||||
RUN sed -i "s/UsePAM.*/UsePAM no/g" /etc/ssh/sshd_config && \
|
||||
sed -i "s/UsePrivilegeSeparation.*/UsePrivilegeSeparation no/g" /etc/ssh/sshd_config
|
||||
|
||||
RUN echo "123456" | passwd --stdin root
|
||||
|
||||
CMD ["/usr/sbin/sshd","-D"]
|
||||
Loading…
Reference in New Issue
Block a user