@Sandal6823@sh.itjust.works to Linux@lemmy.ml • edit-27 days agoWhy disable ssh login with root on a server if I only log in with keys, not password?message-square22fedilinkarrow-up171arrow-down13file-text
arrow-up168arrow-down1message-squareWhy disable ssh login with root on a server if I only log in with keys, not password?@Sandal6823@sh.itjust.works to Linux@lemmy.ml • edit-27 days agomessage-square22fedilinkfile-text
On a server I have a public key auth only for root account. Is there any point of logging in with a different account?
minus-square@lordnikon@lemmy.worldlinkfedilinkEnglish17•7 days agoYes it’s always better to login with a user and sudo so your commands are logged also having disable passwords for ssh but still using passwords for sudo gives you the best protection
minus-square@grrgyle@slrpnk.netlinkfedilink3•edit-27 days agoAlso double check that sudo is the right command, by doing which sudo. Something I just learned to be paranoid of in this thread. Unless which is also compromised, my god…
Yes it’s always better to login with a user and sudo so your commands are logged also having disable passwords for ssh but still using passwords for sudo gives you the best protection
Also double check that sudo is the right command, by doing
which sudo
. Something I just learned to be paranoid of in this thread.Unless
which
is also compromised, my god…