Hi,
I have to create an SFTP client for an SFTP server running on Serv-U (which I saw in the list of supported servers). I created the Private Key using the Serv U Management console. Now, whenver I try to connect to it, I get an exception:
com.enterprisedt.net.j2ssh.transport.publickey.InvalidSshKeyException: Can't read key due to cryptography problems
at com.enterprisedt.net.j2ssh.openssh.OpenSSHPrivateKeyFormat.decryptKeyblob(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.publickey.SshPrivateKeyFile.toPrivateKey(Unknown Source)
at com.enterprisedt.net.ftp.ssh.SSHFTPClient.setAuthentication(Unknown Source)
at com.enterprisedt.net.ftp.ssh.SSHFTPClient.setAuthentication(Unknown Source)
at com.equens.nl.cordys.ac.sftp.client.SFTPClient.getConnection(SFTPClient.java:118)
at com.equens.nl.cordys.ac.sftp.client.SFTPClient.getDirectoryListing(SFTPClient.java:160)
at com.equens.nl.cordys.ac.sftp.client.SFTPClient.main(SFTPClient.java:211)
Caused by: java.security.NoSuchAlgorithmException: Unsupported passphrase algorithm: DES-EDE3-CFB
at com.enterprisedt.net.j2ssh.openssh.PEMReader.decryptPayload(Unknown Source)
... 7 more
Here is the log:
DEBUG [CryptixProperties] 7 aug 2008 16:36:10.690 : Successfully loaded the CryptixEDT properties file
INFO [puretls] 7 aug 2008 16:36:10.768 : PureTLS debug level=0
DEBUG [com.enterprisedt.net.j2ssh.transport.cipher.SshCipherFactory] 7 aug 2008 16:36:10.799 : Loading supported cipher algorithms
DEBUG [SshKeyExchangeFactory] 7 aug 2008 16:36:10.799 : Loading key exchange methods
DEBUG [SshKeyExchangeFactory] 7 aug 2008 16:36:10.815 : The default key exchange is not set! using first in list
DEBUG [com.enterprisedt.net.j2ssh.transport.publickey.SshKeyPairFactory] 7 aug 2008 16:36:10.815 : Loading public key algorithms
DEBUG [ConfigurationLoader] 7 aug 2008 16:36:10.924 : Security provider 0: SUN
DEBUG [ConfigurationLoader] 7 aug 2008 16:36:10.924 : Security provider 1: SunRsaSign
DEBUG [ConfigurationLoader] 7 aug 2008 16:36:10.924 : Security provider 2: SunJSSE
DEBUG [ConfigurationLoader] 7 aug 2008 16:36:10.924 : Security provider 3: SunJCE
DEBUG [ConfigurationLoader] 7 aug 2008 16:36:10.924 : Security provider 4: SunJGSS
DEBUG [ConfigurationLoader] 7 aug 2008 16:36:10.924 : Security provider 5: SunSASL
DEBUG [ConfigurationLoader] 7 aug 2008 16:36:10.924 : Security provider 6: CryptixEDT
DEBUG [com.enterprisedt.net.j2ssh.transport.publickey.SshKeyPairFactory] 7 aug 2008 16:36:10.924 : The default public key is not set! using first in list
DEBUG [SshCompressionFactory] 7 aug 2008 16:36:10.924 : Loading compression methods
DEBUG [SshCompressionFactory] 7 aug 2008 16:36:10.924 : Installed none compression
DEBUG [SshCompressionFactory] 7 aug 2008 16:36:10.924 : Installed zlib compression
DEBUG [SshHmacFactory] 7 aug 2008 16:36:10.940 : Loading message authentication methods
INFO [LicenseProperties] 7 aug 2008 16:36:10.971 : Licence expiry date: 31 dec 9999
INFO [LicenseProperties] 7 aug 2008 16:36:10.971 : Production licence
DEBUG [SSHFTPClient] 7 aug 2008 16:36:10.971 : Class: com.enterprisedt.net.ftp.ssh.SSHFTPClient
Version: 1.5.2
Build timestamp: 31-May-2007 10:07:52 EST
Java version: 1.5.0_06
CLASSPATH: C:\Europa\workspace\SFTPConnector\classes;C:\Europa\workspace\SFTPConnector\platform\int\wcp.jar;C:\Europa\workspace\SFTPConnector\platform\int\ldap.jar;C:\Europa\workspace\SFTPConnector\sdk\lib\coelib.jar;C:\Europa\workspace\SFTPConnector\lib\edtftpj-pro.jar;C:\Europa\workspace\SFTPConnector\lib\license.jar
OS name: Windows XP
OS arch: x86
OS version: 5.1
DEBUG [SSHFTPClient] 7 aug 2008 16:36:10.971 : Created SFTP client.
DEBUG [com.enterprisedt.net.j2ssh.transport.publickey.SshPrivateKeyFile] 7 aug 2008 16:36:10.971 : Parsing private key file
DEBUG [com.enterprisedt.net.j2ssh.transport.publickey.SshPrivateKeyFormatFactory] 7 aug 2008 16:36:10.986 : Loading private key formats
DEBUG [com.enterprisedt.net.j2ssh.transport.publickey.SshPrivateKeyFormatFactory] 7 aug 2008 16:36:10.986 : Installing OpenSSH-PrivateKey private key format
DEBUG [com.enterprisedt.net.j2ssh.transport.publickey.SshPrivateKeyFormatFactory] 7 aug 2008 16:36:10.986 : Installing SSH.COM-PrivateKey-Base64Encoded private key format
DEBUG [com.enterprisedt.net.j2ssh.transport.publickey.SshPrivateKeyFormatFactory] 7 aug 2008 16:36:11.2 : Installing SSHTools-PrivateKey-Base64Encoded private key format
INFO [OpenSSHPrivateKeyFormat] 7 aug 2008 16:36:11.2 : Unpacking OpenSSH formatted private key
Please advice on what may be wrong, this is my first venture in building an SFTP client.
Thanks in advance.
Regards,
Sabyasachi.