forked from metalogical/BigFiles
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
修改/etc/ssh/sshd_config、/etc/ssh/ssh_host_rsa_key执行权限文件
- Loading branch information
Showing
1 changed file
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,15 +8,15 @@ RUN go get github.com/akrylysov/algnhsa && \ | |
|
||
FROM openeuler/openeuler:22.03 | ||
LABEL maintainer="Zhou Yi [email protected]" | ||
# RUN useradd -s /bin/bash BigFiles | ||
RUN useradd -s /bin/bash BigFiles | ||
USER root | ||
#配置ssh服务 | ||
RUN dnf -y update && \ | ||
dnf -y install openssh && \ | ||
dnf -y install openssh-server && \ | ||
dnf -y install openssh-clients && \ | ||
dnf -y install sshpass | ||
RUN echo 'root:123456' | chpasswd | ||
RUN echo 'BigFiles:123456' | chpasswd | ||
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config | ||
|
||
WORKDIR /etc/ssh | ||
|
@@ -28,8 +28,11 @@ COPY --chown=BigFiles:group --from=BUILDER /home/scripts/ssh / | |
RUN chmod +x /port_forward.sh | ||
RUN chmod +x /start.sh | ||
RUN chmod +x /begin.sh | ||
RUN chmod 305 /etc/ssh/sshd_config | ||
RUN chmod 305 /etc/ssh/ssh_host_rsa_key | ||
|
||
WORKDIR /home/BigFiles | ||
USER BigFiles | ||
COPY --chown=BigFiles:group --from=BUILDER /home/main /home/BigFiles/main | ||
|
||
EXPOSE 23231 | ||
|