예제 #1
0
        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")));
        }
예제 #2
0
        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")));
        }
예제 #3
0
        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//")));
        }