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

shodan

Member
Sep 1, 2022
49
20
13
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 !
 

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!