Question Details

No question body available.

Tags

powershell ssh powershell-7.0

Answers (1)

February 10, 2026 Score: 4 Rep: 194 Quality: Low Completeness: 50%

There is no support for using a -Credential with the SSH Transport. SSH over PSRemoting wraps the ssh binary which doesn't expose a way to provide a username/password combo. You should be using key authentication or something else like Kerberos/GSSAPI which can provide a non-interactive way to authenticate as a user over SSH.

Technically speaking your could hack in non-interactive password authentication with SSH_ASKPASS but it's not simple and requires you to expose the password in a potentially risky way that I would not recommend.