When you generate a key pair in SecureCRT, it generates it in this format:
—- BEGIN SSH2 PUBLIC KEY —-
—- END SSH2 PUBLIC KEY —-
This key if fine, but if you run a linux server such as CentOS, RedHat, Fedora, or many others which use OpenSSH for it’s sshd; then this key does not work in ~/.ssh/authorized_keys. In order to convert this key to the one liner necessary for openssh, first upload it to the server. Either cutting and pasting into your text editor of choice, or uploading the file directly will work.
Then run the following command to add this key file to your authorized keys:
ssh-keygen -i -f /tmp/identity2.pub >> ~/.ssh/authorized_keys
You can then log in using your private key.
Here is the switch we are using:
-i Convert IETF SECSH to OpenSSH key file.