public IActionResult SSHConnect() { string pwd = (System.IO.File.Exists("pwd.txt")) ? System.IO.File.ReadAllText("pwd.txt") : ""; SSHify ssh = new SSHify("sftp.rxebate.com", 22, "Nick", pwd); return(Ok(ssh.shellScript("ls"))); }
public IActionResult sshFtpUpload() { string pwd = (System.IO.File.Exists("pwd.txt")) ? System.IO.File.ReadAllText("pwd.txt") : ""; SSHify ssh = new SSHify("sftp.rxebate.com", 22, "Nick", pwd); ssh.lsDir(""); return(Ok(ssh.uploadFile("C:\\temp\\Summary.pdf", "RxETEST/upload"))); }
public IActionResult sshFtpDownload() { string pwd = (System.IO.File.Exists("pwd.txt")) ? System.IO.File.ReadAllText("pwd.txt") : ""; SSHify ssh = new SSHify("sftp.rxebate.com", 22, "Nick", pwd); ssh.lsDir(""); return(Ok(ssh.downloadFile("RxETEST/upload/test.png", "C://temp//"))); }