Allan Smithee
Allan Smithee

Reputation: 21

Prevent PowerShell from automatically passing my Windows username to "ssh"

How do I prevent PowerShell from entering my Windows username as the user in ssh? I try to access OctoPi for instance. I open PowerShell. I enter:

ssh octopi.local

PowerShell then returns:

[username]@octopi.local's password:

(note: username hidden for privacy purposes).

Of course, I can never login this way, because that user doesn't exist on the Raspberry Pi!

When I do this using PuTTY, I am correctly prompted to enter the username:

login as: pi
[email protected]'s password:
Linux octopi 5.4.79-v7+ #1373 SMP Mon Nov 23 13:22:33 GMT 2020 armv7l

Why would PowerShell assume that I want to pass my Windows username to something I'm logging into? How do I prevent this from happening?

Upvotes: 1

Views: 250

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202282

Specify the desired username on the ssh commandline:

ssh [email protected]

(btw, this is not a PowerShell question, you are just using OpenSSH ssh client)

Upvotes: 2

Related Questions