Fix SSH session crash: Disable PAM and enable stderr logging
This commit is contained in:
@@ -43,6 +43,20 @@ spec:
|
||||
- name: clawdbox
|
||||
image: default-route-openshift-image-registry.apps.lab.apilab.us/clawdbox/clawdbox:latest
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- /bin/bash
|
||||
- "-c"
|
||||
- |
|
||||
mkdir -p /data/ssh
|
||||
if [ ! -f /data/ssh/ssh_host_rsa_key ]; then
|
||||
echo 'Generating persistent host keys...'
|
||||
ssh-keygen -f /data/ssh/ssh_host_rsa_key -N '' -t rsa
|
||||
ssh-keygen -f /data/ssh/ssh_host_ecdsa_key -N '' -t ecdsa
|
||||
ssh-keygen -f /data/ssh/ssh_host_ed25519_key -N '' -t ed25519
|
||||
fi
|
||||
chmod 600 /data/ssh/ssh_host_*_key
|
||||
# Run sshd with PAM disabled and logging to stderr
|
||||
/usr/sbin/sshd -D -e -f /etc/ssh/sshd_config -o UsePAM=no
|
||||
ports:
|
||||
- containerPort: 2222
|
||||
name: ssh
|
||||
@@ -62,7 +76,7 @@ spec:
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
fsGroup: 1000
|
||||
allowPrivilegeEscalation: true
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user