Connect to FTP server using only certificate, without hardcoded password

Advertisement

debolina
Joined:
Posts:
1

Connect to FTP server using only certificate, without hardcoded password

We are working on a project, where we perform file transfer from 1 system to another. The server is run using CopSSH and the client uses WinSCP API.

Currently we are evaluating ways of performing secure transfer, without using hardcoded credentials. Can this be done, by using only certificates, and without mentioning the password:
SessionOptions sessionOptions = new SessionOptions
{
    Protocol = Protocol.Ftp,
    FtpSecure = FtpSecure.Explicit,
    HostName = "ip address",
    UserName = "tester",
    TlsClientCertificatePath = "Path to certificate file",
};

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Connect to FTP server using only certificate, without hardcoded password

Afaik, CopSSH is an SSH/SFTP server. Not an FTP server. SFTP uses private keys in general, not certificates. I do not think your current code can works against CopSSH. Please make sure you know if you are connecting to an FTP or SFTP server.

Reply with quote

Advertisement

You can post new topics in this forum