aksarben wrote:I don't see an SFTP client on that site! Note that FTPS is not the same as SFTP !
Jakarta Commons (http://commons.apache.org/proper/commons-net/) advertises secure FTP support, if you haven't looked there yet...
user8988272 wrote:Then most likely the default key files for sftp2 are being used . SFTP sits on the top of SSH and SSH derives it's security through the use of passwords and/or public key cryptography so you must be using one or other or both of these methods.
Our application is running on Windows 2008 server. We have several Windows command script that transfers file using SFTP through Tectia ssh client installed on the Windows server. However it is unstable and we are looking to migrate these SFTP transfers to Java.
Using Windows command "sftp2 user@servername:directory_path", we transfer the files without password and providing the key path.
To use SCP / SFTP in Java, is it possible to transfer files using username, host, port alone?Of course not! This would have no security at all and I assume you are using SFTP because you need to transfer the files securely.
I do not know the password and private / public keys are already installed on our servers and also on the client servers for an authenticated communication. If still keys need to be used on Java program then how it should be used?There are many Java SSH/SFTP libraries and Google will find them - JSch is the one I tend to use. For secure communication you will need to know the server's public key and you will need to use the current client private and public key keys.
I went through some articles about using JSch but didn't help me understand how to use the private / public key that are already installed on the servers.You need to spend more time learning about SSH/SFTP since the use of the private / public keys are fundamental to the operation of SSH/SFTP .
sabre150 wrote:Same here.
There are many Java SSH/SFTP libraries and Google will find them - JSch is the one I tend to use.