ISSUE | RESOLVED || FAIL : Login with public key failed for user 'centos'


If you are using Mobaxterm or Putty to Login to a linux machine using public-private key through SSH and see below error while trying same using Robotframework, that means there is something wrong with the key.

20180112 14:16:10.260 :  INFO : Logging into '' as 'centos'.
20180112 14:16:11.967 :  FAIL : Login with public key failed for user 'centos'

SSHLibrary.Open Connection                port=443
${conn}=            Login With Public Key         centos           ${CURDIR}\\privatekey.ppk
Log    ${conn}


The reason is you are not using the right format of key.

1.      Open Puttygen, load your ppk key.

2.      Go to Conversion.

3.      Convert to OpenSSH.

4.      Now use this key instead of ppk file.

And it should work, unless you are

Recent Posts