brettrsmithjr wrote:
OK, so how am I supposed to do it if I do not have a password, just a username and a ftp site with port information?
1) Have you been given the private key by the S/FTP site administrator, or have you generated one yourself?
2) Were you given the key in PPK or OpenSSH format?
Assuming (please check & confirm) that you've been supplied with the Private Key, and that it's in PPK format, you can use this command to establish your connection with the S/FTP site:
open <protocol>://<username>@<hostname> -privatekey="<FullPathToKeyFile>.ppk" -hostkey="<your servers host key>"
example:
open sftp://SFTPUser@SFTPServer.domain.local -privatekey="D:\sftp\keys\SFTPUser.ppk" -hostkey="ssh-rsa 1024 e2:dd:11:2e:82:32:ab:62:59:1c:c8:62:1d:2b:28:99"
brettrsmithjr wrote:
I also want to know how can I write this in C#?
See
here for C# programming help.