Proxmox - Grant SSH Access to a LXC Container
Use case: When I'm unable to SSH into a proxmox container from my machine.
- Identify: First, find the container’s ID or name. Replace {{num}} with the appropriate container identifier in the following commands.
lxc-attach --name {{num}}
- Edit: Once inside the container, open the SSH configuration file with a text editor.
nano /etc/ssh/sshd_config
- Locate the line PermitRootLogin without-password and update it to:
PermitRootLogin yes
- Restart ssh service
service ssh restart