Compare commits

...

1 Commits

Author SHA1 Message Date
Emran Billah 6fbae80d29 ssh working ok, need to test with two separate computers when I have access to 2 ubuntu machines
Create and publish a Docker image / build-and-push-image (push) Successful in 5m59s Details
2024-09-13 16:59:24 -03:00
2 changed files with 17 additions and 0 deletions

View File

@ -14,8 +14,21 @@ RUN apt-get update && apt-get install -y \
util-linux \
bsdmainutils \
vim \
openssh-server \
&& rm -rf /var/lib/apt/lists/*
# Create necessary directories for SSH
RUN mkdir /var/run/sshd
# Create the user 'spiri' and set passwords for both 'root' and 'spiri'
RUN useradd -m spiri && \
echo 'root:spiri-friend' | chpasswd && \
echo 'spiri:spiri-friend' | chpasswd && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# Expose SSH port
EXPOSE 22
# Clone the xbnet repository
RUN git clone https://github.com/jgoerzen/xbnet.git /usr/src/xbnet

View File

@ -16,6 +16,10 @@ echo "Starting entrypoint.sh"
echo "Setting associated environment variables. Calling /set-env-vars.sh"
source /set-env-vars.sh
# Start SSH in the background
echo "Starting SSH service..."
/usr/sbin/sshd
# Main loop
loop() {
echo "Starting loop"