I had been trying to write PermitRootLogin yes in /etc/ssh/sshd_config file as a normal user.
In search of that from somewhere I got this,
echo "PermitRootLogin" yes | sudo tee -a /etc/ssh/sshd_config
Also, I got to know that "I can explicitly pass the root password for any sudo command on the same line"
Like echo <password> | sudo -S apt-get install tmux
So, my question is how can I merge these two commands and make a single command, that appends the PermitRootLogin yes to the specified file as a normal user using a root password.
sudoersconfig if you need to allow passwordlesssudo. Be aware of the consequences! – pLumo Jul 21 '22 at 06:13sudoers. – Aditya Vaste Jul 21 '22 at 06:20-Sis necessary, I forgotten – Aditya Vaste Jul 21 '22 at 06:22