87 karma · joined February 1, 2017
Not at all. Due to lack of documentation I look at code of foreign libraries and applications all the time to check what really happens inside and what are the guaranties. The latter being often the case when it comes to concurrency problems.
For over ten years of commercial work I used a debugger only a couple of times and in most cases it was against someone else's code, usually when things were completely broken and I needed to get backtraces from multiple deadlocked threads or lacked debugging symbols and things like radare were also required. There were also times when I manually called a syscall using gdb.
My opinion is that if you can't reason about the code helping yourself with just a couple of additional messages the code is probably broken/too complicated to begin with and requires serious refactoring. I've never understood people stepping through a program hoping to find some mysterious creature somewhere along a huge stack of calls. In my career I have often seen people always debugging an application as a whole instead of separated modules. Dividing a problem is the key. The same key that allows me to still program using vim without autocompletion, keep APIs sane and coherent, and avoid dead code.
One really useful exception is when dealing with electronics. My friends programming hardware use debuggers all the time and in this case it actually makes perfect sense because there is no way to print anything and things like hardware interrupts come into play.
- The Theory of Type Hints - PEP 483
- Annotations - PEP 3107 - 3.0
- Type hints - PEP 484 - 3.5
- Variable annotations - PEP 526 - 3.6
- Postponed evaluation - PEP 563 - 3.7 (3.10)
- Core support - PEP 560 - 3.7
- Distribution - PEP 561 - 3.7
- Data Classes - PEP 557 - 3.7
- Literal types - PEP 586 - 3.8
- TypedDict (limit keys) - PEP 589 - 3.8
- Final qualifier - PEP 591 - 3.8
- Static duck typing - PEP 544 - 3.8
- Flexible annotations - PEP 593 - 3.9
- Type Hinting Generics In Standard Collections - PEP 585 - 3.9
https://www.youtube.com/watch?v=JqYhuwu614Y
Yelle - A Cause Des Garcons
On the other hand, the objectives list contains: "this guide will attempt to cover as many of them as possible". Despite that, it still misses basic security rules.
"A desktop class computer [...] That I want to be able to SSH to remotely from unknown computers and unknown locations (i.e. a friend's house)."
SSH from an unknown computer? Also see my original comment about what is missing in description of a situation when connecting to your server from a new system.
> Are you saying a public key can be used to decrypt data it encrypted? Or are you saying a public key could also be used to decrypt data that the private key encrypted?
See my discussion with derefr in this thread.
> You mention "server room". This guide is intended for a person running a simple server in their home.
The "server room" here means you are sitting next to your server and can connect point-to-point. It doesn't mean you need a backup diesel generator.
And if it is really about a home server, concerns like "make sure nobody is listening" don't make sense.
> I made some other updates to the guides that I hope address your other concerns?
I've seen you accepted pull requests of some contributors that fixed the basics for you. Because they were generated right after discussion in this thread they concern things discussed here.
> Also, I want more folks to use Linux. Most distributions are so similar there is no value in having so many distribution specific guides -- all it does is create unnecessary confusion and steer potential prospective users away from Linux.
How many (which) distros have you managed as a professional sysadmin to state that with high confidence?
I'm quite sure that a beginner will just choose Ubuntu and proceed to something like https://linuxjourney.com/. If someone becomes more than a hobbyist one will hopefully go and read something from a trusted source, written by sysadmins with a good grasp of contemporary cryptography involved.
There are two fresh threads on Reddit:
https://www.reddit.com/r/linuxadmin/comments/arx7xo/howtosec...
https://www.reddit.com/r/linux/comments/arx7st/howtosecureal...
"One key, the public key, can only encrypt data, not decrypt it" - this is cryptographically inaccurate. One should use it that way, though.
"Identity is verified by encrypting and decrypting data that both the client and server know". That's not how signing works. The crucial part of the process is to first establish an encrypted channel, then choose something random (not used previously) and finally verify the signature is correct. What exactly would be the data that "both the client and server know"?
"If you're sure there is nobody listening between the client you're on and your server, you can use ssh-copy-id to transfer and append the public key". Almost never happens unless you're in the server room, connected point-to-point. But then the remark about someone listening doesn't make sense. And not a single word about verifying server's fingerprint in the whole guide.
"Keep in mind doing this means you can't use the key for automation because you'll have no way to send the passphrase in your scripts". Unless you use an ssh-agent.
"umask is a Bash built-in which means a user can change their own umask setting". Wrong implication here. umask is a syscall. It doesn't matter what you use to call it. And what if you're using a different shell?
Suggesting painful default umask instead of just doing `chmod go-rwx $HOME` and adjusting /etc/adduser.conf is debatable.
Making this guide "distribution agnostic" is IMHO futile and there already are some distribution-specific guides like https://debian-handbook.info/.