CT's not using ssh port configurations properly on (re)boot?

Skyrider

Active Member
May 11, 2020
55
1
28
38
I noticed last week that the default port 22 is used every time I restart the container (and it applies to all of my Ubuntu 18 to 22.04 containers), and I'm forced to restart the ssh service to use the new port while I've changed the port to something else:

/etc/ssh/sshd_config
Code:
Port newport 
#AddressFamily any
ListenAddress 0.0.0.0
#ListenAddress ::

Code:
lsof -i -P -n | grep LISTEN
systemd       1            root   55u  IPv6 47445333      0t0  TCP *:22 (LISTEN)
systemd-r   181 systemd-resolve   13u  IPv4 47445174      0t0  TCP 127.0.0.53:53 (LISTEN)
mongod      198         mongodb   10u  IPv4 47447433      0t0  TCP 127.0.0.1:27017 (LISTEN)

Now, restarting the ssh service.

Its changing from systemd to sshd

Code:
lsof -i -P -n | grep LISTEN
systemd-r   181 systemd-resolve   13u  IPv4 47445174      0t0  TCP 127.0.0.53:53 (LISTEN)
mongod      198         mongodb   10u  IPv4 47447433      0t0  TCP 127.0.0.1:27017 (LISTEN)
sshd      22961            root    3u  IPv4 85772084      0t0  TCP *:newport (LISTEN)

More info:
Code:
pveversion -v
proxmox-ve: 7.2-1 (running kernel: 5.15.35-2-pve)
pve-manager: 7.2-4 (running version: 7.2-4/ca9d43cc)
pve-kernel-5.15: 7.2-4
pve-kernel-helper: 7.2-4
pve-kernel-5.15.35-2-pve: 5.15.35-5
pve-kernel-5.15.35-1-pve: 5.15.35-3
pve-kernel-5.15.30-2-pve: 5.15.30-3
ceph-fuse: 15.2.16-pve1
corosync: 3.1.5-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.24-pve1
libproxmox-acme-perl: 1.4.2
libproxmox-backup-qemu0: 1.3.1-1
libpve-access-control: 7.2-2
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.2-2
libpve-guest-common-perl: 4.1-2
libpve-http-server-perl: 4.1-2
libpve-storage-perl: 7.2-4
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 4.0.12-1
lxcfs: 4.0.12-pve1
novnc-pve: 1.3.0-3
proxmox-backup-client: 2.2.3-1
proxmox-backup-file-restore: 2.2.3-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.5.1
pve-cluster: 7.2-1
pve-container: 4.2-1
pve-docs: 7.2-2
pve-edk2-firmware: 3.20210831-2
pve-firewall: 4.2-5
pve-firmware: 3.4-2
pve-ha-manager: 3.3-4
pve-i18n: 2.7-2
pve-qemu-kvm: 6.2.0-10
pve-xtermjs: 4.16.0-1
qemu-server: 7.2-3
smartmontools: 7.2-pve3
spiceterm: 3.2-2
swtpm: 0.7.1~bpo11+1
vncterm: 1.7-1
zfsutils-linux: 2.1.4-pve1

Code:
cores: 4
features: nesting=1
hostname: dragonias
memory: 2048
net0: name=eth0,bridge=vmbr0,firewall=1,gw=10.248.110.115,hwaddr=7A:F3:CC:F0:01:B4,ip=10.248.110.200/24,type=veth
onboot: 1
ostype: ubuntu
rootfs: local-zfs:subvol-200-disk-0,size=50G
swap: 512
unprivileged: 1

Any idea as to why it's doing this?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!