debian 10 lxc template login problem

luciandf

Member
Feb 20, 2020
16
0
6
41
Hello all,

I am quite new to proxmox and today I stumbled upon a problem which I cannot figure out. I wanted to create a debian 10 container. I downloaded the archive, configured the name, password etc. and started it. All was fine until I wanted to login. The password I set earlier for the root account doesn't work in the local console of the newly started container.

Anyone knows what is going on?
 
answering my own problem! turns out that I need to load a ssh public key and login from a console with it. The password login is disabled for the root accout! I know this is a security thing but still...
 
Hi,

can you login to the container with command: pct enter <VMID> ? and please post config as well pct config <VMID>


i recommend you to read wiki proxmox about Containers it's really helpful [1] :)

[1] https://pve.proxmox.com/wiki/Linux_Container


Hi, I solved the problem like I said above. If I load a ssh publick key and then login with that it works fine. When I do what you said, I end up at the same login screen I see from the internal proxmox console and the root password I set when I create the container still doesn't work. Then problem is in the debian container settings for ssh root login.
 
hi,

probably you need to change config ssh /etc/ssh/sshd_config and enable root login from
#PermitRootLogin prohibit-password
to
PermitRootLogin yes

Then service ssh restart and try login with out public key
 
hi,

probably you need to change config ssh /etc/ssh/sshd_config and enable root login from
#PermitRootLogin prohibit-password
to
PermitRootLogin yes

Then service ssh restart and try login with out public key
yes, see that was the problem! I couldn't login into the container so I could enable that! I know how to enable root login and everything and I was expecting that I could login via the internal console and then create a user in the container and enable ssh for the new user. But, no! I couldn't login in the container even from the internal console or the pve command.

The only way it worked was from my computer terminal via ssh after I loaded a ssh public key when I created the container.
 
HI,

i have the same problem when creating new installations. I did the mentioned steps but without result. Any suggestion?


1692726005751.png

I did the step
change config ssh /etc/ssh/sshd_config and enable root login from
#PermitRootLogin prohibit-password
to
PermitRootLogin yes

1692725874289.png
 

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!