Generated key in putty keygen
Try to paste public key and it says “key invalid”
cPanel -> SSH Access -> Import SSH Key
Error:
Failed to import public key named “”.
Invalid key.
1 Answers
- Open pub key file
- You CAN use this however you need to do the following:
- Chop off the first and last lines.
- Take the part of the comment between the double quotes and put it after the double equals at the end. Make sure there is a space AFTER the last ‘=’. Do not quote the comment.
- remove all newlines after each line.
- Add “ssh-rsa ” to the beginning.
---- BEGIN SSH2 PUBLIC KEY ---- Comment: "rsa-key-20140211" AAAAB3NzaC1yc2EAAAABJQAAAQEAg+mGBY10bAy0F+unn6MjfYgWs7MXeHQADjL6 2yHYBcHoZ95sRR4GC2S+m+8iaS3qT5XwWC4mcF1xtpIb2EzZH6CkONw+cykqJERR o1ZAwgYdgrZEyh8bXW32+BvYS5YT6i/66Ln7Z6rVC4rhu30f3yCXp1Fc8+GyDvA0 5d1mWu8krADlQg8RUqNjVF2Gd1G9Kqq+gcx0EV6x+NUC/XJBt1PY6XhJrT1P6RaB hSmxSVvplNcy5JiemtvsEkVmrSzdmoz0ZWAYvkpilud/3FfAM0dKSTjnptkqxQdm /GgDPhH8TafDQ2qFTmGBVUNsjh1mNI/hKHzt7AbsPOS+BVlbuw== ---- END SSH2 PUBLIC KEY ----
Your outcome will look like this
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAg+mGBY10bAy0F+unn6MjfYgWs7MXeHQADjL62yHYBcHoZ95sRR4GC2S+m+8iaS3qT5XwWC4mcF1xtpIb2EzZH6CkONw+cykqJERRo1ZAwgYdgrZEyh8bXW32+BvYS5YT6i/66Ln7Z6rVC4rhu30f3yCXp1Fc8+GyDvA05d1mWu8krADlQg8RUqNjVF2Gd1G9Kqq+gcx0EV6x+NUC/XJBt1PY6XhJrT1P6RaBhSmxSVvplNcy5JiemtvsEkVmrSzdmoz0ZWAYvkpilud/3FfAM0dKSTjnptkqxQdm/GgDPhH8TafDQ2qFTmGBVUNsjh1mNI/hKHzt7AbsPOS+BVlbuw== rsa-key-20140211
Credit/source: https://forums.cpanel.net/threads/help-installing-clients-ssh-public-key.332951/