Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5.2k views
in Java FTP by (120 points)
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.

1 Answer

0 votes
by (162k points)
There's something unusual or perhaps non-standard about the format of your public keys in the known_hosts file. What kind of server are you connecting to?

If you email the known_hosts file to us we can take a look. support at enterprisedt dot com.

Categories

...