A Debian 10 (Buster) Template was used to create a container and updated and then backed up and renamed as a later version template using the second method as described therein at:
https://febryandana.xyz/posts/proxmox-create-lxc-instance-and-template/
If a new container is created with the updated template using
If DHCP is used in creating the new container, the SSH will not work correctly as the
https://febryandana.xyz/posts/proxmox-create-lxc-instance-and-template/
If a new container is created with the updated template using
static ip
, all works fine is the following are done on startup (/etc/hosts
does not have a domain but search is the domain):
Bash:
ssh-keygen -q -t rsa -b 4096 -f ~/.ssh/id_rsa -P "" <<<y >/dev/null 2>&1
# If not done and needed:
# sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
service ssh restart
/etc/hosts
will have a local IP like 127.0.1.2
and the /etc/resolv.conf
will have both domain and search as localdomain
.
Last edited: