I am trying server validation - public key files
I generated the public(MyKeyPair.pub) and private key(MyKeyPair) using ssh-keygen from windows client machine.
copied the public key on the aix server and created authorised_keys using cat publickeyname >> authorized_keys in the .ssh directory under home/<userid> folder.
Now when I run the example java code by giving hostname,username,password,privatekey file name, I am getting
Creating SFTP client
Setting user-name and password
Loading server public-key from MyKeyPair
com.enterprisedt.net.j2ssh.transport.publickey.InvalidSshKeyException: The key format is not a supported format
at com.enterprisedt.net.j2ssh.transport.publickey.SshPublicKeyFile.parse(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.publickey.SshPublicKeyFile.parse(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.publickey.SshPublicKeyFile.parse(Unknown Source)
at com.enterprisedt.net.ftp.ssh.SSHFTPValidator.addKnownHost(Unknown Source)
at TestSFTP.main(TestSFTP.java:55)
Not sure why I am getting this message.
Any help will be greately appriciated.