Skip to main content
Grammatical corrections (incl. formatting)
Source Link
JW0914
  • 8.2k
  • 7
  • 30
  • 50
 

I had the same problem, and itThis seems to be related to the version of SSHOpenSSH you're running.

If I type

where ssh

I get...:

C:\Windows\System32\OpenSSH\ssh.exe
C:\Program Files\Git\usr\bin\ssh.exe
  • where ssh returns:
    %WinDir%\System32\OpenSSH\ssh.exe
    %ProgramFiles%\Git\usr\bin\ssh.exe
    
    ssh -V returns:
    # %WinDir%\System32\OpenSSH\ssh.exe
      OpenSSH_7.5p1, without OpenSSL
    
    # %ProgramFiles%\Git\usr\bin\ssh.exe
      OpenSSH_7.3p1, OpenSSL 1.0.2k  26 Jan 2017
    

When I run ssh -V in both locations, I get

OpenSSH_7.5p1, without OpenSSL
OpenSSH_7.3p1, OpenSSL 1.0.2k  26 Jan 2017

...respectively

So, when I runrunning ssh..\Git\usr\bin\ssh.exe from the git/bin directory, it works fine and doesn't complain about the permissions, but running the same command line, using the former installation of SSH, it..\OpenSSH\ssh.exe comes back with this.

Load key "t:\\mykeys\\rich-private.ppk": invalid format
[email protected]: Permission denied (publickey).

ps. the permissions on the filefollowing, even though key ACLs are just full accessFull Access for myself, and nothing else.:

load key "t:\mykeys\rich-private.ppk": invalid format
  [email protected]: Permission denied (publickey).

I had the same problem, and it seems to be related to the version of SSH you're running.

If I type

where ssh

I get...

C:\Windows\System32\OpenSSH\ssh.exe
C:\Program Files\Git\usr\bin\ssh.exe

When I run ssh -V in both locations, I get

OpenSSH_7.5p1, without OpenSSL
OpenSSH_7.3p1, OpenSSL 1.0.2k  26 Jan 2017

...respectively

So, when I run ssh from the git/bin directory, it works fine and doesn't complain about the permissions, but running the same command line, using the former installation of SSH, it comes back with this.

Load key "t:\\mykeys\\rich-private.ppk": invalid format
[email protected]: Permission denied (publickey).

ps. the permissions on the file are just full access for myself, and nothing else.

 

This seems to be related to the version of OpenSSH you're running:

  • where ssh returns:
    %WinDir%\System32\OpenSSH\ssh.exe
    %ProgramFiles%\Git\usr\bin\ssh.exe
    
    ssh -V returns:
    # %WinDir%\System32\OpenSSH\ssh.exe
      OpenSSH_7.5p1, without OpenSSL
    
    # %ProgramFiles%\Git\usr\bin\ssh.exe
      OpenSSH_7.3p1, OpenSSL 1.0.2k  26 Jan 2017
    

When running ..\Git\usr\bin\ssh.exe, it works fine and doesn't complain about the permissions, but running ..\OpenSSH\ssh.exe comes back with the following, even though key ACLs are Full Access for myself and nothing else:

load key "t:\mykeys\rich-private.ppk": invalid format
  [email protected]: Permission denied (publickey).
Source Link
Rich S
  • 343
  • 2
  • 7

I had the same problem, and it seems to be related to the version of SSH you're running.

If I type

where ssh

I get...

C:\Windows\System32\OpenSSH\ssh.exe
C:\Program Files\Git\usr\bin\ssh.exe

When I run ssh -V in both locations, I get

OpenSSH_7.5p1, without OpenSSL
OpenSSH_7.3p1, OpenSSL 1.0.2k  26 Jan 2017

...respectively

So, when I run ssh from the git/bin directory, it works fine and doesn't complain about the permissions, but running the same command line, using the former installation of SSH, it comes back with this.

Load key "t:\\mykeys\\rich-private.ppk": invalid format
[email protected]: Permission denied (publickey).

ps. the permissions on the file are just full access for myself, and nothing else.