pull down to refresh
"oh shit root just counted the characters in my private key"
but how? by using sudo
(sorry for dumb questions)
reply
sudo means: execute the following command as root. (it means "superuser do", because before sudo we only had su - "superuser", without the... do)
opti@server:~$ id -a
uid=1000(opti) gid=1000(opti) groups=1000(opti)
opti@server:~$ sudo id -a
uid=0(root) gid=0(root) groups=0(root)
Just think like this: every time you do
sudo <command>it means that<command>can read everything on your box, including that secret directory you just didchmod 600on.I don't think you can avoid using it fully, but just think of the above every time you type
sudo.example:
# id -a uid=0(root) gid=0(root) groups=0(root) # ls -lrt /home/opti/.ssh total 20 -rw------- 1 opti opti 399 Feb 5 13:37 id_ed25519 -rw-r--r-- 1 opti opti 94 Feb 5 13:37 id_ed25519.pub -rw-rw-r-- 1 opti opti 49 Feb 5 13:39 config -rw-r--r-- 1 opti opti 928 Feb 6 20:59 known_hosts # cat /home/opti/.ssh/id_ed25519 | wc 7 13 399"oh shit root just counted the characters in my private key"