Hi everyone, I cannot ssh into my lxc container after I remap the id, but I cannot find why. I have searched the web and the issue seems very rear. I use both Debian & Ubuntu LXC, both run into same kind of issue. I am thinking maybe this is because my remapping makes something wrong, but I am unable to locate the fault.
proxmox-ve: 6.0-2 (running kernel: 5.0.15-1-pve)
pve-manager: 6.0-4 (running version: 6.0-4/2a719255)
LXC SSHD SERVICE LOG
The ssh connection issue:
LXC.conf
/etc/subuid & subgid
proxmox-ve: 6.0-2 (running kernel: 5.0.15-1-pve)
pve-manager: 6.0-4 (running version: 6.0-4/2a719255)
LXC SSHD SERVICE LOG
root@test:~# systemctl status sshd
* ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-10-18 11:17:08 UTC; 13min ago
Process: 144 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 164 (sshd)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/ssh.service
`-164 /usr/sbin/sshd -D
Oct 18 11:17:07 test systemd[1]: Starting OpenBSD Secure Shell server...
Oct 18 11:17:08 test sshd[164]: Server listening on 0.0.0.0 port 22.
Oct 18 11:17:08 test sshd[164]: Server listening on :: port 22.
Oct 18 11:17:08 test systemd[1]: Started OpenBSD Secure Shell server.
Oct 18 11:17:17 test sshd[320]: fatal: setgroups: Invalid argument [preauth]
The ssh connection issue:
~ ❯❯❯ ssh -p 22 root@192.168.50.205 ✘ 255
ssh: connect to host 192.168.50.205 port 22: Connection refused
~ ❯❯❯ ssh -p 22 root@192.168.50.205 ✘ 255
ssh: connect to host 192.168.50.205 port 22: Connection refused
LXC.conf
arch: amd64
cores: 1
hostname: test
memory: 512
mp0: /hpool/media,mp=/media
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.50.1,hwaddr=02:09:BD:26:24:F7,ip=192.168.50.205/24,type=veth
ostype: ubuntu
rootfs: vm-cache:subvol-105-disk-0,size=8G
swap: 512
unprivileged: 1
lxc.idmap: u 0 100000 1001
lxc.idmap: g 0 100000 1001
lxc.idmap: u 1001 1001 1
lxc.idmap: g 1001 1001 1
lxc.idmap: u 1002 101002 64530
lxc.idmap: g 1002 101002 64530
/etc/subuid & subgid
# /etc/subuid
root:100000:65536
root:1001:1
# /etc/subgid
root:100000:65536
root:1001:1