3 ms·
For this particular use case, I'd suggest sshpass instead. https://linux.die.net/man/1/sshpass ... Operations folks today might not understand -- everythin
by quesera 2y ago
For this particular use case, I'd suggest sshpass instead.
https://linux.die.net/man/1/sshpass
...
Operations folks today might not understand -- everything just works nowadays, which is slightly boring. And boring is good!
But there's something unique about the feeling of making things work even though they are not designed to work, and really have no right to work. Expect has been a lifesaver for some of the most critical systems at some of the biggest companies in the world.
No aspersions cast by me!
- hiAndrewQuinn 2y agoDefinitely, `sshpass` is the more better keyhole tool for this job. I picked it as the most common example I can imagine everyone going "ugh, I have to do this by hand again?" at.
- oxygen_crisis 2y agosshpass is a travesty of security. It has all the pitfalls of putting your front door key under your doormat. Except you're doing it in a world where everyone can materialize a unique key out of thin air, and you can always instantly tell your door which of those keys should or shouldn't be allowed to open it. sshpass is a curse, even calling it a crutch would be improper flattery. It's a dangerous cheat that accomplishes nothing except impeding people from otherwise spending the 20 minutes it takes to figure out SSH keys.
- yusyusyus 2y agosometimes the device you're connecting to doesnt support ssh keys.
- deleted 2y ago[deleted]
- quesera 2y agoYes this is the proper dogma, but you're missing the point. Any automation around passwords is a crutch and a mistake. But sometimes it is necessary. You don't always control the remote systems. The remote systems are not always capable of key-based auth. And sometimes the remote system is not of high concern so the "danger" is null. sshpass makes a reasonable effort to do the best-possible thing under these less-than-ideal circumstances. The other options suck more. My most recent use of sshpass is to collect reports from a vendor over sftp. I would have preferred to use https with BASIC auth, but in truth that has exactly the same problems as sshpass, and I have other hills to die on.