Enable ssh root login Fedora 34

Radomir Franek

New Member
Apr 21, 2021
4
0
1
51
Hello,

I have new CT with OS Fedora 34. I created CT with ansible + Proxmox. In Fed34 is default in sshd_config disable RootLogin. I need after create CT enable root without edit config /etc/ssh/sshd_config.
My code configuration for Proxmox + Ansible is for install sudo, sshd....
- name: 'Install Python 3 on fedora.server'
delegate_to: server.dev
become: true
become_method: sudo
become_user: root
command: lxc-attach -n 112 -- dnf -y install python3

Any idea for default enable RootLogin when create CT?

Thanks
 
I need after create CT enable root without edit config /etc/ssh/sshd_config.
How do you mean "without edit config"? To change the behaviour of the ssh daemon in the container, you must edit it...

If you mean how to edit it without SSHing into the container, you could use 'pct push' for example (see 'man pct'), or even just create a template you like and make (linked) clones of it instead of creating a new container.