Ok, I managed to reproduces this in a clean "ubuntu:latest" docker container. Steps to reproduce are below. During testing, I noticed that I aliased "ssh" to "ssh -K -X", and that "-K" (or equivalently "-o GSSAPIAuthentication=yes") is crucial. This changes the problematic SSH client command to
Notice "monitor_read: unpermitted request 48" on the server, and "Connection closed by 1.2.3.4 port 2222" on the client (instead of the expected "permission denied).
Ok, I managed to reproduces this in a clean "ubuntu:latest" docker container. Steps to reproduce are below. During testing, I noticed that I aliased "ssh" to "ssh -K -X", and that "-K" (or equivalently "-o GSSAPIAuthentic ation=yes" ) is crucial. This changes the problematic SSH client command to
ssh -o PreferredAuthen tications= gssapi- with-mic, gssapi- keyex root@ac3f9944f201 -v -p 2222 -o GSSAPIKeyExchan ge=yes -o GSSAPIAuthentic ation=yes -F /dev/null
Complete steps to reproduce (container ac3f9944f201 is the server, IP 1.2.3.4 is the IP of the container host; this needs to be adapted):
Server:
podman run -it -p 2222:2222,8888:88 ubuntu
apt update kadm5.acl kadm5.dict
apt install openssh-server krb5-kdc krb5-admin-server
touch /etc/krb5kdc/
touch /etc/krb5kdc/
krb5_newrealm
kadmin.local
addprinc user
addprinc -randkey host/ac3f9944f201
ktadd -k /etc/krb5.keytab host/ac3f9944f201
exit
mkdir /run/sshd ge=yes -o GSSAPIAuthentic ation=yes
/usr/sbin/sshd -d -p 2222 -f /dev/null -o GSSAPIKeyExchan
Client:
podman run -it ubuntu
apt update
apt install openssh-client krb5-user
kinit user
echo "1.2.3.4 ac3f9944f201" >> /etc/hosts
ssh -o PreferredAuthen tications= gssapi- with-mic, gssapi- keyex root@ac3f9944f201 -v -p 2222 -o GSSAPIKeyExchan ge=yes -o GSSAPIAuthentic ation=yes -F /dev/null
Notice "monitor_read: unpermitted request 48" on the server, and "Connection closed by 1.2.3.4 port 2222" on the client (instead of the expected "permission denied).