Hi,
We are trying to perform SSH-FTP between two Solaris machine A & B using
Public-key authentication method. For this, we have created two key files private & public keys (identity & identity.pub respectively) using ssh-keygen tool.
We have logged in using two different users in both the servers namely User-A in machine A and User-B in machine B for this operation. This public key (identity.pub) has been placed under the .ssh folder (in User-B's work folder) in machine B in the name authorized_keys.
we have the following questions regarding this:
1) can we use two different usernames (User-A & User-B) in both the Solaris machines for the FTP?
2) Do we need to have same version of SSH version in both the machines? Bcos we have the following versions in both the machines.
Machine A: Sun_SSH_1.1.1, SSH protocols 1.5/2.0, OpenSSL 0x0090704f
Machine B: SSH Version OpenSSH_2.3.0p1, protocol versions 1.5/2.0.
3) while creating the key files, which one we have the use w.r.to the above version of SSH? Either rsa, dsa or rsa(1)?
Apart from this while trying to transfer the file, machine B is not authenticating machine A and hence throwing the following error:
INFO: Loading private key formats
Jan 6, 2010 3:10:36 PM com.sshtools.j2ssh.transport.publickey.SshPrivateKeyFile parse
INFO: Private key is not in the default format, attempting parse with other supported formats
Enter passphrase:
file.toPrivateKeysetKey(key)ssh.authenticate(pk)Jan 6, 2010 3:10:38 PM com.sshtools.j2ssh.authentication.PublicKeyAuthenticationClient authenticate
INFO: Generating data to sign
Jan 6, 2010 3:10:38 PM com.sshtools.j2ssh.authentication.PublicKeyAuthenticationClient authenticate
INFO: Preparing public key authentication request
Authenticated : result is >>> 2
The authentication failed
Exception in thread "main" com.sshtools.j2ssh.SshException: Authentication has not been completed!
at com.sshtools.j2ssh.SshClient.openSessionChannel(Unknown Source)
at com.sshtools.j2ssh.SshClient.openSftpChannel(Unknown Source)
at com.sshtools.j2ssh.SftpClient.<init>(Unknown Source)
at com.sshtools.j2ssh.SshClient.openSftpClient(Unknown Source)
at com.sshtools.j2ssh.SshClient.openSftpClient(Unknown Source)
at Test.main(Test.java:84)
We are not able to proceed further. Please let us know how this could be accomplished?
Thanks,
Swami.