6 ms·
I agree with the rest of the commenters here that the XY problem problem is a way bigger one. Example: "How do you implement a new system call in the Linux ker
by Rerarom 7y ago
I agree with the rest of the commenters here that the XY problem problem is a way bigger one. Example:
"How do you implement a new system call in the Linux kernel?"
"Ah, well, a system call is overkill and leads to compatibility issues, you should try to see whether you cannot solve your problem some other way..."
"My problem is I want to understand how system calls are implemented thus I want to go through all the steps of making a new one so that I don't miss something"
Or, a more recent one from Reddit:
"When will we have desktop computers capable of replicating the feat of Google with AlphaGo?"
"Ah, well, we already have distributed computing trained NNs, also there is some research that it may not require such power..."
"I'm not interested in Go, I'm interested in the power of future computers!"
Seriously, people second-guessing you are annoying.
- leetcrew 7y agotry asking "how can I automate ssh authentication by password?" sometime. I've still never found an answer other than "never do that, here's how to use ssh-agent."
- detaro 7y agoThere's actually a pretty good Stackoverflow answer to this one: https://stackoverflow.com/a/43526842 https://stackoverflow.com/a/43526842 (Which I think is a good pattern: sure, mention the "you probably should consider Y", but show the alternatives as well)
- marcosdumay 7y agoAnd the person's comment after the answer gives him 7 different options (6 since the very start) is "no, I can't use option #1". That's unsettling.
- detaro 7y agoI read the response as "I can't use any of these" - which again leads us to them not asking the "right" question.
- marcosdumay 7y agoThey want to do easily something that is hard. I can understand their revolt because it shouldn't be hard, but it is. The easiest way out is probably #1, what probably will need the cooperation of some uncooperative 3rd party. It's the correct question, it's just that the answer sucks.
- rocqua 7y agoHonestly, I hope am answer to that question is never posted on stack overflow. As for an answer, i think something like cat passwd.txt - | ssh Might work. Didn't test it though. The cat outputs all arguments in order, and - is stdin.
- marcosdumay 7y agoThis one doesn't work.
- rocqua 7y agoWhy not?
- clarry 7y agossh probably doesn't read the password from stdin.
- buckminster 7y agoThis is also a really annoying habit: giving a crap answer and then demanding an explanation of how it fails. The meta-answer: if it was this easy people wouldn't keep asking about it. For decades now! When I tried it fifteen years ago ssh insisted on reading the password from keyboard input, not stdin.
- rkeene2 7y ago> Why not? SSH reads the password from the terminal, otherwise it couldn't read the password on a piped input
- LeoPanthera 7y agossh doesn't accept the password from stdin. Don't just guess if you don't know. That's worse than not helping at all.
- peteradio 7y agopexpect
- fiddlerwoaroof 7y agoOr just expect, which might be more likely to be available. Also, there’s sshpass
- Shoop 7y agosshpass works nicely.
- rkeene2 7y agoThere's a program called "sshpass" to do this.
- PascLeRasc 7y agoThere's another anti-pattern that I can't recall the name of, where instead of asking if something can do something, you make the claim that it can't, and let them refute you. It's excellent for something people get very defensive over, like Unix.
- leetcrew 7y agoit seems that I just (unintentionally) did exactly that. I guess my Google skills sucked four years ago.
- koala_man 7y agoWhen I tried googling your exact question, the first hit (https://serverfault.com/a/512220 https://serverfault.com/a/512220) was a SE post where the highest voted (though not accepted) answer was doing exactly that with `sshpass` Tbqh, without you explicitly stating that you're aware of key pairs and concluded that storing plaintext passwords is the best solution for you, I would excuse anyone who thought that you maybe just hadn't done the research.
- daveFNbuck 7y agoHow is the second answer second-guessing? Replicating the feat is a question of both software and hardware. To give an answer that's just about hardware would require second-guessing the intent of the question.
- mlevental 7y agoit's not just annoying but also offensive because you're being condescended to
- threatofrain 7y agoSecond guessing is just called theory of mind in a complex world. You’d expect an futuristic AI to have this judgment too.
- roberto 7y ago> "I'm not interested in Go, I'm interested in the power of future computers!" Reminded me of this story. I told a co-worker, while we worked on our DB: - I wish we had the money to run Oracle. - Are you crazy? Postgres is awesome and perfect for us! - I know. I'm not saying "I wish we were running Oracle". I just wanted to have the money to do that. :)
- emilfihlman 7y ago>Seriously, people second-guessing you are annoying. And? You are the extremely small minority. You need to learn to live with it.
- koala_man 7y agoA bigger problem for you specially, or for communities in general?
- rbavocadotree 7y ago> "How do you implement a new system call in the Linux Kernel?" > My problem is I want to understand how system calls are implemented thus I want to go through all the steps of making a new one so that I don't miss something" These are very different statements, and require different answers. It's like asking "How do I sort a List" vs. "I would like to understand sorting algorithms, what are some resources to start with?". People second guessing led to what you actually should have asked in the first place.