Hi Team
I want to perform password less SFTP from Web farm server to Application server. I have 3 questions in this regard ->
Question 1. How to perform passwordless SFTP in Rebex method without using password ? Looks like password is compulsory parameter ?
Currently i am transferring the using SFTP protocol using below syntax ->
Sftp RebexFtp = new Sftp();
RebexFtp.Connect("Server_Name");
RebexFtp.Login("UserName", "Password");
But as per organization policy, since i must do password less SFTP, i can not use password here. Hence i checked Rebex method that
has sshprivate key as parameter. But in order to create sshprivatekey object, password is must, which I don't want to provide.
SshPrivateKey sshPrivateKey = new SshPrivateKey("MyPrivateKey.ppk", "password");
RebexFtp.Login("UserName", sshPrivateKey);
ftp.PutFile("sourcepath", "Destination_path");
My question is how to do SFTP transfer of file without using password and just using private key ? Is it possible in Rebex ?
Question 2. In Webfarm server environment, can I use same public key / private key combination for all web farm servers?
In regular scenario, we generally have one source server and one destination server to establish trust for password less connectivity.
But in my case, I have 4 web different farm servers as source and 1 application server as destination.
In this case, can I use same public private key combination from all 4 source servers to the one destination server ?
Is it good idea ?
Question 3. Path for creating ssh private key object on web server
Since my code will execute on web farm server, while creating object for ssh private key, what path do i need to give, physical or relative ?
SshPrivateKey sshPrivateKey = new SshPrivateKey("MyPrivate_Key.ppk", "password");
Please let me know. Since this is urgent.