Live data from Hacker News

Non-interactive SSH password authentication

vincent.bernat.ch

31–40 of 128 posts

Re: Non-interactive SSH password authentication

#31
post #15

The 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?

I’ve always been told that ssh is not supposed to work non-interactively. Which is the whole reason for sshpass, to work non-interactively. Ie. Broken by design.

[deleted]

Re: Non-interactive SSH password authentication

#32
post #21

Earlier quoted context omitted.

Honest question, unless it's mandated by your employer, or you don't personally care, why would you ever choose to use a service that doesn't offer that?

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.

Re: Non-interactive SSH password authentication

#33

Earlier quoted context omitted.

Honest question, unless it's mandated by your employer, or you don't personally care, why would you ever choose to use a service that doesn't offer that?

You may be in a position where you must employ and interact with networked equipment that does not support pubkey authentication.

Yeah this is why fido2 doesn't work either. Most embedded ssh implementations don't support it.

Re: Non-interactive SSH password authentication

#34

The 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?

You may wish to edit your comment to clarify that the author of https://github.com/clarkwang/passh claims sshpass is broken by design, not the author of the linked article.

Re: Non-interactive SSH password authentication

#35
post #30

I 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?

Re: Non-interactive SSH password authentication

#36
post #30

I 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…

These are a good idea for large enterprise organizations. We are using a product called Securden which offers PAM features.

(But I much prefer keys/certs over passwords where possible.)

Re: Non-interactive SSH password authentication

#37
post #21

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.

Not on IOS XR: https://vincent.bernat.ch/en/blog/2020-syncing-ssh-keys-iosx.... The commands you mention are for NXOS.

Re: Non-interactive SSH password authentication

#38

The 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?

You are probably asking about the passh page. Examples there show that sshpass creates a new permanent tty entry with each use, while passh does not.

More importantly though is that sshpass keeps your password permanently on your computer, thus increasing security risks considerably.

Re: Non-interactive SSH password authentication

#39
post #30

I 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…

They become a very high value target though and I have learned "security software" devs are as fallible as all devs, sometimes more.

Thycotic had some vulnerability with a symmetric recovery key a few years ago. But comprehensive product like this or roll your own this is frequent so I'd rather do keys and certs like others suppose

Re: Non-interactive SSH password authentication

#40
post #30

I 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…

I fully agree. Essentially, the PAM wraps a pure knowledge-based “keys as capabilities” model into a much richer “real capabilities” model.
Post reply on HN