How can I make the console mode "shell" by default instead of tty ? (for lxc containers)

shodan

Active Member
Sep 1, 2022
176
56
33
All my containers only allow login via private key and have no text password allowed.
So for me, tty console is never usable.

1665265164778.png

I would like to make "shell" the default console mode whenever I create a new container, can this be done ?

thanks !
 
no, but if you create the containers with the api/cli you can give that parameter directly on creation, e.g.:

Code:
pct create ... --cmode shell
 
  • Like
Reactions: Moayad
Where in the proxmox code is TTY made the default ?

I just restarted using proxmox and fell into that same problem.

I would like to fix it for good !
 
hi,

the default is defined here:

https://git.proxmox.com/?p=pve-cont...60b53e9a1c450f37a397dc3575008bd1;hb=HEAD#l581

and the code that extracts that default is here:

https://git.proxmox.com/?p=pve-cont...0b53e9a1c450f37a397dc3575008bd1;hb=HEAD#l1729

but instead of locally changing the source, maybe you might want to open a bug report/feature request on our bugtracker:

https://bugzilla.proxmox.com with a bit of description why this default does not work for you, maybe we can find a way to improve the situation for all (e.g. if on creation we don't set the root password, we could set the console mode automatically? not sure about security etc. implications though)
 
Wow thank you for this in depth answer !!
You must know the code like the back of your hand to have found this so quickly !!
I will make a little script to find and flip this default and I will make a feature request about it once I have figured it out ! Thanks !
 
Wow thank you for this in depth answer !!
You must know the code like the back of your hand to have found this so quickly !!
I will make a little script to find and flip this default and I will make a feature request about it once I have figured it out ! Thanks !
I'd be interested in your script and/or this feature