Unable to use key file

Jone Jamson picture Jone Jamson · Apr 10, 2016 · Viewed 30.2k times · Source

I generated a username using the following command ssh -keygen -b 1024 -f user -t dsa and now I'm trying to use putty to login with my private key but it doesn't work . I receive the following error message?

Unable to use key file C:\Users\admin\Desktop\da.ppk (OpenSSH SSH-2 private key)

I just created a notepad with the name da.ppk

-----BEGIN DSA PRIVATE KEY-----
MIIBugIBAAKBgQDTpIlC4HDT8+R7nALILZfh9zA93J9r9CYwrvNFIUa+43toyABg
vY2P2gwsC1xPraujPYb2+AVZPmyrbtjmnw+4zIXufcz6mw4nlYJfc5Rd0Ms00uWB
uMmQlqOYMG6HJHjyVmMd631rGu9lQeSTwzDq6H9BZl9keuxmgVB4nF651QIVAOdB
min0w2sHLA0X3MHDIKj1t7PzAoGADpUoMeeI5JM7yoQ2bQTe1FKEVI9LS09MCwfJ
3TNVjcVqF8EQAK5tSLTo1bVUVrKXi22Aamd1o/3b+IDjG28VQV/vysej7X2TmxZ2
Y8RYpKD8eMhRkgYSVMzwyUj28kYGAPtO+AJtd2Lolr8Vx8DdhpK/YygKWoPPX6gu
SRKgeD8CgYAqUInGtRYaFXIFw10ahbzVKCxUuB2KngkPpNKzEJeXtFoeXirt3BCR
c8AtqassvzluUF3a1Y9L+zt8Bf7Xo7vU0wvpEEnjKG4Lcl2SeO8Eoqb1wZcDbDJC
wqv0g+PG8dI4uqboFPqAIr4/s/U+/REW81PHx7wjfhaBe2GXoBAbrQIUXZzuw+aG
ERrD9L4URL9HP2GbWno=
-----END DSA PRIVATE KEY-----

Answer

Krzysztof Krasoń picture Krzysztof Krasoń · Apr 10, 2016

You will need to convert that key using PuTTYgen (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) to a key usable by PuTTY.

The steps are:

  • Download PuTTYgen.
  • Load your key
  • Save the private key

See https://unix.stackexchange.com/questions/74545/what-difference-between-openssh-key-and-putty-key