Search code examples
windowspowershellsshputty

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
pi@octopi.local'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?


Solution

  • Specify the desired username on the ssh commandline:

    ssh user@example.com
    

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