Пример #1
0
        public static bool mkDir(String remotePath)
        {
            SshConnectionInfo objInfo = new SshConnectionInfo();

            objInfo.User = "******";
            objInfo.Host = "106.75.3.227";
            objInfo.Pass = "******"; //基于密码
            SFTPHelper objSFTPHelper = new SFTPHelper(objInfo);

            return(objSFTPHelper.ftpMkdir(remotePath));
        }
Пример #2
0
        public static bool UploadFile(String localPath, String remotePath)
        {
            SshConnectionInfo objInfo = new SshConnectionInfo();

            objInfo.User = "******";
            objInfo.Host = "106.75.3.227";
            objInfo.Pass = "******"; //基于密码
            SFTPHelper objSFTPHelper = new SFTPHelper(objInfo);

            return(objSFTPHelper.Upload(localPath, remotePath));
        }