Proxmox - Grant SSH Access to a LXC Container


Use case: When I'm unable to SSH into a proxmox container from my machine.

  1. Identify: First, find the container’s ID or name. Replace {{num}} with the appropriate container identifier in the following commands.
lxc-attach --name {{num}}
  1. Edit: Once inside the container, open the SSH configuration file with a text editor.
nano /etc/ssh/sshd_config
  1. Locate the line PermitRootLogin without-password and update it to:
PermitRootLogin yes
  1. Restart ssh service
service ssh restart