1

I'm trying to connect to my Jetsonnano from Windows 10 via ssh. If i use my Ubuntu Pc everything works fine, but if i use my Windows 10 Laptop I see this Error:

Permission denied, please try again.

After I type in the correct Password.

Thank you all for your Time and Help

mkloster
  • 21
  • 1
  • 7

2 Answers2

1

Open the terminal

  1. start ssh-agent eval$(ssh-agent -s)

  2. add a key to the ssh-agent (if prompted, enter the password)

  3. ssh-add ~/.ssh/id_rsa

  4. test connection ssh -T git@github.com

  5. Clone the repo git clone git@github.com:antonykidis/Setup-ssh-for-github.git

  6. Enjoy

Important:

Every time you start a new Terminal instance:

You will have to call ssh-agent.

Add RSA key to the ssh-agent.

Loop through these steps every time you close/open the terminal.

Because the terminal “loses” ssh-agent with its keys on every session.

Check this information:

  1. Open C:\Program Files\Git\etc\ssh\ssh_config (if that’s where you installed Git)
  2. Add lines
  3. Host github.com or ubuntu host machine
  4. IdentityFile ~/.ssh/
Everton P M A
  • 159
  • 1
  • 7
0

Check for the pwsh executable path first:
Get-Command pwsh | select Source
this will give you the path of powershell core path

Get-Command powershell | select Source
this command on the other hand will return the path of earlier version of powershell
i.e. powershell version 5 etc.

I was also having the same issue. After I blindly copied a command from a blog post and executed it:

New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell
-Value "C:\Program Files\PowerShell\7\pwsh.exe" -PropertyType String -Force

I scratched my head for more than 10 hours.

then I did debug run of sshd with this command on Windows 10 host:

sshd -d 

and tried to connect from my Linux machine as usual:

ssh james@192.168.1.123

I saw this line in my Windows debug prompt:

User james not allowed because shell c:\\program files\\powershell\\7\\pwsh.exe does not exist

so I executed this command again with modified path to Powershell 7 executable:

New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell 
-Value "C:\Program Files\WindowsApps\Microsoft.PowerShell_7.2.1.0_x64__8wekyb3d8bbwe\pwsh.exe" 
-PropertyType String -Force

and it fixed my problem.

Barun Ghosh
  • 61
  • 2
  • 7