A Cake add-on to upload/download/list/delete files on a SFTP Server
This add-on uses the excellent SSH.NET package (see https://github.com/sshnet/SSH.NET/)
#addin "nuget:?package=Cake.SFTP&loaddependencies=true"
Task("UploadToSFTP")
.IsDependentOn("CreateInstaller")
.Does(() =>
{
var settings = new SFTPSettings
{
UserName = "someUserName",
Password = "somePassword",
Host = "192.168.1.100",
Port = 22
};
SFTPUploadFile(settings, "somefile.txt", "uploads/somefile.txt");
});