Skip to content

Commit

Permalink
[ptf] Fixed root ssh authentication issue (#3192)
Browse files Browse the repository at this point in the history
Signed-off-by: Nazarii Hnydyn <[email protected]>
  • Loading branch information
nazariig authored and lguohan committed Jul 23, 2019
1 parent 39b641e commit 77b3a18
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dockers/docker-ptf/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ RUN rm -rf /debs \

## Adjust sshd settings
RUN mkdir /var/run/sshd \
&& echo 'root:root' | chpasswd \
&& sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config \
&& sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config \
&& sed -i '$aUseDNS no' /etc/ssh/sshd_config
&& echo 'root:root' | chpasswd \
&& sed -ri '/^#?PermitRootLogin/c\PermitRootLogin yes' /etc/ssh/sshd_config \
&& sed -ri '/^#?UsePAM/c\UsePAM no' /etc/ssh/sshd_config \
&& sed -ri '/^#?UseDNS/c\UseDNS no' /etc/ssh/sshd_config

COPY ["supervisord.conf", "/etc/supervisor/"]
COPY ["conf.d/supervisord.conf", "conf.d/sshd.conf", "conf.d/ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
Expand Down

0 comments on commit 77b3a18

Please sign in to comment.