Skip to content

Commit

Permalink
edit: edit DockerFile
Browse files Browse the repository at this point in the history
修改/usr/sbin/sshd操作权限
  • Loading branch information
Zherphy committed Dec 6, 2024
1 parent 4bd3859 commit c9c3ee5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions DockerFile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/
WORKDIR /etc/ssh
#生成ssh服务本地秘钥
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_ecdsa_key -N ""
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_ed25519_key -N ""

#复制ssh服务启动与端口转发脚本
COPY --chown=BigFiles:group --from=BUILDER /home/scripts/ssh /
Expand All @@ -30,6 +32,7 @@ RUN chmod +x /start.sh
RUN chmod +x /begin.sh
# RUN chmod 305 /etc/ssh/sshd_config
RUN chmod 777 /etc/ssh/sshd_config
RUN chmod 777 /usr/sbin/sshd
RUN chmod 305 /etc/ssh/ssh_host_rsa_key

WORKDIR /home/BigFiles
Expand Down

0 comments on commit c9c3ee5

Please sign in to comment.