Discuss (FTP) and (SFTP, FTPS and SCP), our Java file transfer clients.
no avatar
User

krish22

Posts

1

Joined

Fri Jun 06, 2008 7:07 am

The key format is not a supported format

by krish22 » Fri Jun 06, 2008 7:24 am

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.
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: The key format is not a supported format

by support2 » Fri Jun 06, 2008 2:45 pm

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.

Who is online

Users browsing this forum: No registered users and 21 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign