Fix versions des paquets + fix output ssh-agent
Gel des versions des paquets installés pour plus de stabilité entre les différentes versions du bastion. Ajout également d'un renvoi vers /dev/null de l'output du SSH-Agent lors de la connexion aux machines distantes.
This commit is contained in:
parent
210c5af848
commit
c30c55a463
10
Dockerfile
10
Dockerfile
@ -1,11 +1,11 @@
|
||||
FROM alpine:3.20.0 AS monosphere-builder
|
||||
#~The open Monosphere Project~
|
||||
#Version : 0.5.7
|
||||
#Version : 0.5.8
|
||||
#Autor : Siphonight :)
|
||||
|
||||
|
||||
#Setting default settings, please change them at run
|
||||
ARG MONOSPHERE_VERSION="0.5.7 Alpha"
|
||||
ARG MONOSPHERE_VERSION="0.5.8 Alpha"
|
||||
|
||||
|
||||
#Defining build settings
|
||||
@ -14,7 +14,7 @@ USER root
|
||||
|
||||
|
||||
#Updating and installing required dependencies
|
||||
RUN apk add make git gcc alpine-sdk && \
|
||||
RUN apk add make=4.4.1-r2 git=2.45.2-r0 gcc=13.2.1_git20240309-r0 alpine-sdk=1.0-r1 && \
|
||||
addgroup root abuild && \
|
||||
mkdir -p /var/cache/distfiles && \
|
||||
chmod a+w /var/cache/distfiles
|
||||
@ -52,8 +52,8 @@ USER root
|
||||
|
||||
#Preparations
|
||||
#Updating and installing required dependencies
|
||||
RUN apk add openssh-server openssh-client sudo openrc bash && \
|
||||
apk --no-cache add shadow
|
||||
RUN apk add openssh-server=9.7_p1-r4 openssh-client=9.7_p1-r4 sudo=1.9.15_p5-r0 openrc=0.54-r1 bash=5.2.26-r0 && \
|
||||
apk --no-cache add shadow=4.15.1-r0
|
||||
|
||||
|
||||
#Ensuring that the SSH server will be able to run without issues on container launch
|
||||
|
||||
@ -41,11 +41,11 @@ function main_menu () {
|
||||
if [ -z "$(echo "$selected_server" | cut -d ' ' -f 4)" ]; then
|
||||
ttyrec -z --"$(echo "$selected_server" | cut -d ' ' -f 1)"-"$(echo "$selected_server" | cut -d ' ' -f 3)"-- -k 300 --warn-before-kill 60 -- ssh -p "$(echo "$selected_server" | cut -d ' ' -f 2)" "$(echo "$selected_server" | cut -d ' ' -f 3)"@"$(echo "$selected_server" | cut -d ' ' -f 1)"
|
||||
else
|
||||
eval "$(ssh-agent)"
|
||||
eval "$(ssh-agent)" > /dev/null
|
||||
trap 'kill $SSH_AGENT_PID' EXIT
|
||||
cat /"$AUTHORIZED_SERVERS_PATH"/"$(echo "$selected_server" | cut -d ' ' -f 4)" | ssh-add -
|
||||
cat /"$AUTHORIZED_SERVERS_PATH"/"$(echo "$selected_server" | cut -d ' ' -f 4)" | ssh-add - > /dev/null
|
||||
ttyrec -z --"$(echo "$selected_server" | cut -d ' ' -f 1)"-"$(echo "$selected_server" | cut -d ' ' -f 3)"-- -k 300 --warn-before-kill 60 -- ssh -p "$(echo "$selected_server" | cut -d ' ' -f 2)" "$(echo "$selected_server" | cut -d ' ' -f 3)"@"$(echo "$selected_server" | cut -d ' ' -f 1)"
|
||||
ssh-add -D
|
||||
ssh-add -D > /dev/null
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user