Earlier quoted context omitted.
There are not many network vendors. Check the link in the first footnote for an example how Cisco, the leader in the field, makes it difficult to deploy SSH keys. This is getting better. For example, Juniper (another network vendor) now supports SSH certificates.
I have no idea what's going on in the footnote, but deploying SSH keys on Cisco equipment is like 3 commands (conf t, user x, ssh something something) to deploy public keys, not hard at all.
Non-interactive SSH password authentication
41–50 of 128 posts
Re: Non-interactive SSH password authentication
#42Re: Non-interactive SSH password authentication
#43I ran about 30k machines with sshpass and it worked just fine. Easy to script. I don’t understand at all why we need something else here.
Do you keep all your passwords in one directory or in something more complicated?
Re: Non-interactive SSH password authentication
#44Earlier quoted context omitted.
I have no idea what's going on in the footnote, but deploying SSH keys on Cisco equipment is like 3 commands (conf t, user x, ssh something something) to deploy public keys, not hard at all.
It's been a few years, but this requires manually deploying keys and adding/removing users on all your devices. Most use TACACS+ and/or Radius to centrally manage users, which don't support keys in that way (or at least didn't the last time I worked with them.)
Another possibility would be to use CA certificates for authentication and only TACACS+ for authorization and accounting. Juniper now supports CA certificates. Cisco may in 10 years.
Re: Non-interactive SSH password authentication
#45I believe privileged access management is the proper way to manage access to a password protected systems. It is basically a terminal server, proxy, bastion or anything similar. You log in there with federated identity (for example AD) and it logs you in into target system with some shared or temporary user. Usually it also records session and does other security/compliance related things. Examples are Delinea (forme…
Why not use something like Kerberos (for example) and have the proper identity also on the system where you log in to via SSH?
a) relatively complex to set up properly if its not a Windows in AD
b) an SSO, not federated ID. Which means reasking MFA is not possible.
Re: Non-interactive SSH password authentication
#46Seems overly complicated; sshpass works fine for me. (And the passh examples of why sshpass is broken seem contrived to me.)
Even if avoiding good practices with PKI was defensible (and it definitely is not), further avoiding `sshpass` in favor of this more contorted trickery is (imho) probably the wrong choice.
Re: Non-interactive SSH password authentication
#47The author claims that sshpass is "broken by design" and goes on to show some examples of why, without ever explaining anything. Can anyone enlighten me why sshpass is broken, or explain the examples on that page?
Author here. I don't claim sshpass is "broken by design". I claim it is brittle as it relies on the detection of a password prompt. passh author has several examples here: https://github.com/clarkwang/passh/blob/master/sshpass-broke... .
On the sidebar, in the about, it says,
> sshpass is broken by design
This is another repo. But probably where they got it.
Re: Non-interactive SSH password authentication
#48I ran about 30k machines with sshpass and it worked just fine. Easy to script. I don’t understand at all why we need something else here.
> I ran about 30k machines with sshpass and it worked just fine. Easy to script. I don’t understand at all why we need something else here. Do you keep all your passwords in one directory or in something more complicated?
User: user
Pass: 1
LolRe: Non-interactive SSH password authentication
#49Earlier quoted context omitted.
Why not use something like Kerberos (for example) and have the proper identity also on the system where you log in to via SSH?
Kerberos is a) relatively complex to set up properly if its not a Windows in AD b) an SSO, not federated ID. Which means reasking MFA is not possible.
Isn't reasking MFA on purpose just a way to make people hate MFA? Shouldn't everything support a "Trust this device" option and then never ask again from it?
Re: Non-interactive SSH password authentication
#50Recently I tried to use an sftp script created with expect that ran fine on the command line, but the same script failed to run under cron. I made sure that all environment variables were properly set, but sftp didn't ask me for a password. I think it might have been an issue with the absence of a tty sshpass didn't work, ended up rewriting the whole thing in Paramiko ... only to find out it doesn't respect the http_…
script -qfec "mycommand" /dev/null
If the thing insists on interactive input, then I break out the big guns: https://manpages.debian.org/bookworm/expect/expect.1.en.html