Win32-OpenSSH icon indicating copy to clipboard operation
Win32-OpenSSH copied to clipboard

invalid format err for ed25519 key, need to add a newline at the end of the key make to win ssh work with it

Open jiangying000 opened this issue 1 year ago • 0 comments
trafficstars

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest version
  • [X] Search the existing issues.

Steps to reproduce

PS C:\Users\jy> C:\Users\jy\scoop\apps\openssh\current\ssh -V OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2

PS C:\Users\jy> C:\Users\jy\scoop\apps\openssh\current\ssh -i ./gcp-ed25519 [email protected] Load key "./gcp-ed25519": invalid format [email protected]: Permission denied (publickey).

I can connect to server with this key file in wsl ssh and xshell 7, but not windows ssh

add a newline at the end of the key make win ssh accept this file, but why? (see also: https://stackoverflow.com/a/68593742)

Expected behavior

connect success

Actual behavior

PS C:\Users\jy> C:\Users\jy\scoop\apps\openssh\current\ssh  -i ./gcp-ed25519 [email protected]
Load key "./gcp-ed25519": invalid format
[email protected]: Permission denied (publickey).

Error details

None

Environment data

PS C:\Users\jy> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.2
PSEdition                      Core
GitCommitId                    7.4.2
OS                             Microsoft Windows 10.0.19041
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

9.5

Visuals

No response

jiangying000 avatar Jun 12 '24 16:06 jiangying000