2022年12月17日星期六

在Windows下使用 RClone 挂载Webdav、SFTP、SMB协议远程目录为本地磁盘

软件准备:
Windows系统需要先安装WinFsp用以支持类FUSE文件系统
下载WinFsp官网:https://github.com/winfsp/winfsp/releasess
新建一个文件夹,路径建议全英文,比如D:\rclone
解压文件,将rclone.exe放到文件夹中

配置RClone

在含有rclone.exe文件的目录中空白处右键,选择在终端中打开/在此处打开命令提示符

输入.\rclone config   按以下提示操作,添加自己的webdav服务器,或添加其他网盘,并给他们起个名字,比如webdav。

首次设置时配置文件生成在:C:\用户\你的用户名\.config\rclone\rclone.conf

推荐自建空白rclone.conf文件与rclone.exe放置在同一目录

Rclone webdav方式挂载Linux目录

e)Edit existing remote #编辑已有的远程挂载点
n) New remote #新挂载
d) Delete remote #删除挂载
r) Rename remote #重命名挂载
c) Copy remote #为已有挂载建立一个副本
s) Set configuration password #设置配置密码
q) Quit config #退出配置
e/n/d/r/c/s/q> #首先输入 n 新建一个配置

name > webdav                                   #给你你的挂载点取个名字

然后又是噼里啪啦一堆选项

Choose a number from below, or type in your own value
1 / A stackable unification remote, which can appear to merge the contents of several remotes \ "union"
2 / Alias for a existing remote \ "alias"
3 / Amazon Drive \ "amazon cloud drive"
............略............
Storage>webdav #此处挂载的是webdav

然后

url > http://host:8080                       #输入服务商给的webdav地址

然后输入网站所使用的程序,这里选 other

然后user > 输入用户名

y) Yes type in my own password
g) Generate random password
n) No leave this optional password blank
y/g/n> y        #选择输入密码

设置完密码以后,接着按提示输入一个口令用来代替输入繁琐的密码,默认为空

Bearer token instead of user/pass (eg a Macaroon)
Enter a string value. Press Enter for the default ("").
bearer_token>

接着程序会列出刚刚进行的的配置信息,没有问题的话y确认就好啦

重新回到主界面,在菜单顶上会实现列出已有的挂载点

输入q 退出配置

首次设置配置文件在:C:\用户\你的用户名\.config\rclone\rclone.conf 

命令挂载 webdav 到本地

rclone mount  本地磁盘: o: --cache-dir D:\Temp --allow-other --vfs-cache-mode writes --allow-non-empty

备注: --cache-dir D:\Temp  设置用于在上传之前暂存的地方

有些服务商不支持读取空间大小,会导致挂载显示为0可用或者7.99EB,为正常现象

5.1 创建命令启动脚本

将配置文件C:\用户\你的用户名\.config\rclone\rclone.conf 剪切到在D:\rckone目录

.BAT脚本方式:

在D:\rckone中,新建一个文本文档,将命令

.\rclone.exe mount webdav: o: --cache-dir B:\Temp --allow-other --vfs-cache-mode writes --allow-non-empty

复制到文档中,并将文档另存为rclone.bat,双击rclone.bat即可挂载

VBS脚本方式:

创建挂载脚本

新建文本文档,输入内容:

dim objShell 
set objShell=wscript.createObject("WScript.Shell") 
iReturnCode=objShell.Run(".\rclone.exe mount webdav: o:  --cache-dir %SystemRoot%\TEMP  --allow-other --vfs-cache-mode writes  --vfs-cache-max-age 60s  --allow-non-empty",0,TRUE)

另存为 mount-Webdav.vbs ,与rclone.exe,及rclone.conf 放在同一目录

创建卸载脚本
新建文本文档,输入内容:

set ws=createobject("wscript.shell")
   ws.run "taskkill /f /im rclone.exe",hide 

另存为 End-uount.vbs ,与rclone.exe,及rclone.conf 放在同一目录

挂载远程目录
双击mount-Webdav.vbs执行挂载操作,并刷新资源管理器
卸载远程目录
双击End-uount.vbs执行卸载操作,并刷新资源管理器

Rclone SSH/SFTP方式挂载Linux目录

生成ssh公钥密钥

ssh-keygen -q -t rsa -b 4096 -C "rclone key" -N "" -f ~/.ssh/rclone
cd ~/.ssh/
cat rclone* > rclone-merged                 # <- 须做项,否则会连接失败
在服务器server中添加pub key到~/.ssh/authorized_keys

ssh-copy-id -i ~/.ssh/rclone.pub root@example.com                # <- example.com为访问地址,可以为IP或域名

添加连接配置

F:\rclone\rclone>rclone config
Current remotes:

Name                 Type
====                 ====
smb                  smb
webdav               webdav

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n         # <- 输入 n 创建新连接

Enter name for new remote.
name> sftp                 # <- 输入配置名即  sftp 

Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
 1 / 1Fichier
   \ (fichier)
 2 / Akamai NetStorage
   \ (netstorage)
 3 / Alias for an existing remote
   \ (alias)
 4 / Amazon Drive
   \ (amazon cloud drive)
 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, Digital Ocean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, IONOS Cloud, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Tencent COS, Qiniu and Wasabi
   \ (s3)
 6 / Backblaze B2
   \ (b2)
 7 / Better checksums for other remotes
   \ (hasher)
 8 / Box
   \ (box)
 9 / Cache a remote
   \ (cache)
10 / Citrix Sharefile
   \ (sharefile)
11 / Combine several remotes into one
   \ (combine)
12 / Compress a remote
   \ (compress)
13 / Dropbox
   \ (dropbox)
14 / Encrypt/Decrypt a remote
   \ (crypt)
15 / Enterprise File Fabric
   \ (filefabric)
16 / FTP
   \ (ftp)
17 / Google Cloud Storage (this is not Google Drive)
   \ (google cloud storage)
18 / Google Drive
   \ (drive)
19 / Google Photos
   \ (google photos)
20 / HTTP
   \ (http)
21 / Hadoop distributed file system
   \ (hdfs)
22 / HiDrive
   \ (hidrive)
23 / In memory object storage system.
   \ (memory)
24 / Internet Archive
   \ (internetarchive)
25 / Jottacloud
   \ (jottacloud)
26 / Koofr, Digi Storage and other Koofr-compatible storage providers
   \ (koofr)
27 / Local Disk
   \ (local)
28 / Mail.ru Cloud
   \ (mailru)
29 / Mega
   \ (mega)
30 / Microsoft Azure Blob Storage
   \ (azureblob)
31 / Microsoft OneDrive
   \ (onedrive)
32 / OpenDrive
   \ (opendrive)
33 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ (swift)
34 / Oracle Cloud Infrastructure Object Storage
   \ (oracleobjectstorage)
35 / Pcloud
   \ (pcloud)
36 / Put.io
   \ (putio)
37 / QingCloud Object Storage
   \ (qingstor)
38 / SMB / CIFS
   \ (smb)
39 / SSH/SFTP
   \ (sftp)
40 / Sia Decentralized Cloud
   \ (sia)
41 / Storj Decentralized Cloud Storage
   \ (storj)
42 / Sugarsync
   \ (sugarsync)
43 / Transparently chunk/split large files
   \ (chunker)
44 / Union merges the contents of several upstream fs
   \ (union)
45 / Uptobox
   \ (uptobox)
46 / WebDAV
   \ (webdav)
47 / Yandex Disk
   \ (yandex)
48 / Zoho
   \ (zoho)
49 / premiumize.me
   \ (premiumizeme)
50 / seafile
   \ (seafile)
Storage> sftp                 # <- 输入配置类型即  sftp 

Option host.
SSH host to connect to.
E.g. "example.com".
Enter a value.
host> example.com​ # <- 输入主机名即  example.com

Option user.
SSH username.
Enter a string value. Press Enter for the default (User).
user> root       ​ # <- 输入登录用户名即  root

Option port.
SSH port number.
Enter a signed integer. Press Enter for the default (22).
port> 11113       # <- 输入登录端口号即  root

Option pass.
SSH password, leave blank to use ssh-agent.
Choose an alternative below. Press Enter for the default (n).
y) Yes, type in my own password
g) Generate random password
n) No, leave this optional password blank (default)
y/g/n> y            # <- 输入y选择密码登录
Enter the password:
password:          # <- 输入登录密码
Confirm the password:
password:         # <- 再次输入登录密码

Option key_pem.
Raw PEM-encoded private key.
If specified, will override key_file parameter.
Enter a value. Press Enter to leave empty.
key_pem>         # <- 按回车健选择默认

Option key_file.
Path to PEM-encoded private key file.
Leave blank or set key-use-agent to use ssh-agent.
Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.
Enter a value. Press Enter to leave empty.
key_file>         # <- 按回车健选择默认

Option key_file_pass.
The passphrase to decrypt the PEM-encoded private key file.
Only PEM encrypted key files (old OpenSSH format) are supported. Encrypted keys
in the new OpenSSH format can't be used.
Choose an alternative below. Press Enter for the default (n).
y) Yes, type in my own password
g) Generate random password
n) No, leave this optional password blank (default)
y/g/n>         # <- 按回车健选择默认

Option pubkey_file.
Optional path to public key file.
Set this if you have a signed certificate you want to use for authentication.
Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.
Enter a value. Press Enter to leave empty.
pubkey_file>         # <- 按回车健选择默认

Option key_use_agent.
When set forces the usage of the ssh-agent.
When key-file is also set, the ".pub" file of the specified key-file is read and only the associated key is
requested from the ssh-agent. This allows to avoid `Too many authentication failures for *username*` errors
when the ssh-agent contains many keys.
Enter a boolean value (true or false). Press Enter for the default (false).
key_use_agent>         # <- 按回车健选择默认

Option use_insecure_cipher.
Enable the use of insecure ciphers and key exchange methods.
This enables the use of the following insecure ciphers and key exchange methods:
- aes128-cbc
- aes192-cbc
- aes256-cbc
- 3des-cbc
- diffie-hellman-group-exchange-sha256
- diffie-hellman-group-exchange-sha1
Those algorithms are insecure and may allow plaintext data to be recovered by an attacker.
Choose a number from below, or type in your own boolean value (true or false).
Press Enter for the default (false).
 1 / Use default Cipher list.
   \ (false)
 2 / Enables the use of the aes128-cbc cipher and diffie-hellman-group-exchange-sha256, diffie-hellman-group-exchange-sha1 key exchange.
   \ (true)
use_insecure_cipher>         # <- 按回车健选择默认

Option disable_hashcheck.
Disable the execution of SSH commands to determine if remote file hashing is available.
Leave blank or set to false to enable hashing (recommended), set to true to disable hashing.
Enter a boolean value (true or false). Press Enter for the default (false).
disable_hashcheck>         # <- 按回车健选择默认

Edit advanced config?
y) Yes
n) No (default)
y/n>         # <- 按回车健选择默认

Configuration complete.
Options:
- type: sftp
- host: nas.x0x.cn
- user: root
- port: 11113
- pass: *** ENCRYPTED ***
Keep this "sftps" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>         # <- 按回车健选择默认

到此完已成连接设置添加

Current remotes:

Name                 Type
====                 ====
sftp                 sftp
smb                  smb
webdav               webdav

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q>
创建挂载脚本

新建文本文档,输入内容:

dim objShell 
set objShell=wscript.createObject("WScript.Shell") 
iReturnCode=objShell.Run(".\rclone.exe mount sftp:/mnt o: --cache-dir %SystemRoot%\TEMP --allow-other --vfs-cache-mode writes --vfs-cache-max-age 60s  --allow-non-empty",0,TRUE)

备注:sftp:/mnt 指定挂载根目录

另存为 mount-SFTP.vbs ,与rclone.exe,及rclone.conf 放在同一目录

创建卸载脚本
新建文本文档,输入内容:

set ws=createobject("wscript.shell")
   ws.run "taskkill /f /im rclone.exe",hide 

另存为 End-uount.vbs ,与rclone.exe,及rclone.conf 放在同一目录

挂载远程目录
双击mount-SFTP.vbs执行挂载操作,并刷新资源管理器
卸载远程目录
双击End-uount.vbs执行卸载操作,并刷新资源管理器

Rclone smb方式挂载远程目录


F:\rclone\rclone>.\rclone config
Current remotes:

Name                 Type
====                 ====
sftp                 sftp
webdav               webdav

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n

Enter name for new remote.
name> smb

Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
 1 / 1Fichier
   \ (fichier)
 2 / Akamai NetStorage
   \ (netstorage)
 3 / Alias for an existing remote
   \ (alias)
 4 / Amazon Drive
   \ (amazon cloud drive)
 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, Digital Ocean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, IONOS Cloud, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Tencent COS, Qiniu and Wasabi
   \ (s3)
 6 / Backblaze B2
   \ (b2)
 7 / Better checksums for other remotes
   \ (hasher)
 8 / Box
   \ (box)
 9 / Cache a remote
   \ (cache)
10 / Citrix Sharefile
   \ (sharefile)
11 / Combine several remotes into one
   \ (combine)
12 / Compress a remote
   \ (compress)
13 / Dropbox
   \ (dropbox)
14 / Encrypt/Decrypt a remote
   \ (crypt)
15 / Enterprise File Fabric
   \ (filefabric)
16 / FTP
   \ (ftp)
17 / Google Cloud Storage (this is not Google Drive)
   \ (google cloud storage)
18 / Google Drive
   \ (drive)
19 / Google Photos
   \ (google photos)
20 / HTTP
   \ (http)
21 / Hadoop distributed file system
   \ (hdfs)
22 / HiDrive
   \ (hidrive)
23 / In memory object storage system.
   \ (memory)
24 / Internet Archive
   \ (internetarchive)
25 / Jottacloud
   \ (jottacloud)
26 / Koofr, Digi Storage and other Koofr-compatible storage providers
   \ (koofr)
27 / Local Disk
   \ (local)
28 / Mail.ru Cloud
   \ (mailru)
29 / Mega
   \ (mega)
30 / Microsoft Azure Blob Storage
   \ (azureblob)
31 / Microsoft OneDrive
   \ (onedrive)
32 / OpenDrive
   \ (opendrive)
33 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ (swift)
34 / Oracle Cloud Infrastructure Object Storage
   \ (oracleobjectstorage)
35 / Pcloud
   \ (pcloud)
36 / Put.io
   \ (putio)
37 / QingCloud Object Storage
   \ (qingstor)
38 / SMB / CIFS
   \ (smb)
39 / SSH/SFTP
   \ (sftp)
40 / Sia Decentralized Cloud
   \ (sia)
41 / Storj Decentralized Cloud Storage
   \ (storj)
42 / Sugarsync
   \ (sugarsync)
43 / Transparently chunk/split large files
   \ (chunker)
44 / Union merges the contents of several upstream fs
   \ (union)
45 / Uptobox
   \ (uptobox)
46 / WebDAV
   \ (webdav)
47 / Yandex Disk
   \ (yandex)
48 / Zoho
   \ (zoho)
49 / premiumize.me
   \ (premiumizeme)
50 / seafile
   \ (seafile)
Storage> smb

Option host.
SMB server hostname to connect to.
E.g. "example.com".
Enter a value.
host> example.com

Option user.
SMB username.
Enter a string value. Press Enter for the default (DESKTOP-A0B2SBH\User).
user> User

Option port.
SMB port number.
Enter a signed integer. Press Enter for the default (445).
port> 5445

Option pass.
SMB password.
Choose an alternative below. Press Enter for the default (n).
y) Yes, type in my own password
g) Generate random password
n) No, leave this optional password blank (default)
y/g/n> y
Enter the password:
password:
Confirm the password:
password:

Option domain.
Domain name for NTLM authentication.
Enter a string value. Press Enter for the default (WORKGROUP).
domain>

Edit advanced config?
y) Yes
n) No (default)
y/n>

Configuration complete.
Options:
- type: smb
- host: nas.x0x.cn
- user: User
- port: 5445
- pass: *** ENCRYPTED ***
Keep this "smb1" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y

Current remotes:

Name                 Type
====                 ====
sftp                 sftp
smb                  smb
webdav               webdav

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q>
F:\rclone\rclone>

创建挂载脚本

新建文本文档,输入内容:

dim objShell 
set objShell=wscript.createObject("WScript.Shell") 
iReturnCode=objShell.Run(".\rclone.exe mount smb: o:  --cache-dir %SystemRoot%\TEMP  --allow-other --vfs-cache-mode writes  --vfs-cache-max-age 60s  --allow-non-empty",0,TRUE)

另存为 mount-Smb.vbs ,与rclone.exe,及rclone.conf 放在同一目录

创建卸载脚本
新建文本文档,输入内容:

set ws=createobject("wscript.shell")
   ws.run "taskkill /f /im rclone.exe",hide 

另存为 End-uount.vbs ,与rclone.exe,及rclone.conf 放在同一目录

挂载远程目录
双击mount-Smb.vbs执行挂载操作,并刷新资源管理器
卸载远程目录
双击End-uount.vbs执行卸载操作,并刷新资源管理器
Rclone SSH/SFTP方式挂载Linux目录

生成ssh公钥密钥

ssh-keygen -q -t rsa -b 4096 -C "rclone key" -N "" -f ~/.ssh/rclone
cd ~/.ssh/
cat rclone* > rclone-merged                 # <- 须做项,否则会连接失败
在服务器server中添加pub key到~/.ssh/authorized_keys

ssh-copy-id -i ~/.ssh/rclone.pub root@example.com                # <- example.com为访问地址,可以为IP或域名
添加连接配置

F:\rclone\rclone>rclone config
Current remotes:

Name                 Type
====                 ====
smb                  smb
webdav               webdav

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n         # <- 输入 n 创建新连接

Enter name for new remote.
name> sftp                 # <- 输入配置名即  sftp 

Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
 1 / 1Fichier
   \ (fichier)
 2 / Akamai NetStorage
   \ (netstorage)
 3 / Alias for an existing remote
   \ (alias)
 4 / Amazon Drive
   \ (amazon cloud drive)
 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, Digital Ocean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, IONOS Cloud, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Tencent COS, Qiniu and Wasabi
   \ (s3)
 6 / Backblaze B2
   \ (b2)
 7 / Better checksums for other remotes
   \ (hasher)
 8 / Box
   \ (box)
 9 / Cache a remote
   \ (cache)
10 / Citrix Sharefile
   \ (sharefile)
11 / Combine several remotes into one
   \ (combine)
12 / Compress a remote
   \ (compress)
13 / Dropbox
   \ (dropbox)
14 / Encrypt/Decrypt a remote
   \ (crypt)
15 / Enterprise File Fabric
   \ (filefabric)
16 / FTP
   \ (ftp)
17 / Google Cloud Storage (this is not Google Drive)
   \ (google cloud storage)
18 / Google Drive
   \ (drive)
19 / Google Photos
   \ (google photos)
20 / HTTP
   \ (http)
21 / Hadoop distributed file system
   \ (hdfs)
22 / HiDrive
   \ (hidrive)
23 / In memory object storage system.
   \ (memory)
24 / Internet Archive
   \ (internetarchive)
25 / Jottacloud
   \ (jottacloud)
26 / Koofr, Digi Storage and other Koofr-compatible storage providers
   \ (koofr)
27 / Local Disk
   \ (local)
28 / Mail.ru Cloud
   \ (mailru)
29 / Mega
   \ (mega)
30 / Microsoft Azure Blob Storage
   \ (azureblob)
31 / Microsoft OneDrive
   \ (onedrive)
32 / OpenDrive
   \ (opendrive)
33 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ (swift)
34 / Oracle Cloud Infrastructure Object Storage
   \ (oracleobjectstorage)
35 / Pcloud
   \ (pcloud)
36 / Put.io
   \ (putio)
37 / QingCloud Object Storage
   \ (qingstor)
38 / SMB / CIFS
   \ (smb)
39 / SSH/SFTP
   \ (sftp)
40 / Sia Decentralized Cloud
   \ (sia)
41 / Storj Decentralized Cloud Storage
   \ (storj)
42 / Sugarsync
   \ (sugarsync)
43 / Transparently chunk/split large files
   \ (chunker)
44 / Union merges the contents of several upstream fs
   \ (union)
45 / Uptobox
   \ (uptobox)
46 / WebDAV
   \ (webdav)
47 / Yandex Disk
   \ (yandex)
48 / Zoho
   \ (zoho)
49 / premiumize.me
   \ (premiumizeme)
50 / seafile
   \ (seafile)
Storage> sftp                 # <- 输入配置类型即  sftp 

Option host.
SSH host to connect to.
E.g. "example.com".
Enter a value.
host> example.com​ # <- 输入主机名即  example.com

Option user.
SSH username.
Enter a string value. Press Enter for the default (DESKTOP-5B77GK9\User).
user> root       ​ # <- 输入登录用户名即  root

Option port.
SSH port number.
Enter a signed integer. Press Enter for the default (22).
port> 11113       # <- 输入登录端口号即  root

Option pass.
SSH password, leave blank to use ssh-agent.
Choose an alternative below. Press Enter for the default (n).
y) Yes, type in my own password
g) Generate random password
n) No, leave this optional password blank (default)
y/g/n> y            # <- 输入y选择密码登录
Enter the password:
password:          # <- 输入登录密码
Confirm the password:
password:         # <- 再次输入登录密码

Option key_pem.
Raw PEM-encoded private key.
If specified, will override key_file parameter.
Enter a value. Press Enter to leave empty.
key_pem>         # <- 按回车健选择默认

Option key_file.
Path to PEM-encoded private key file.
Leave blank or set key-use-agent to use ssh-agent.
Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.
Enter a value. Press Enter to leave empty.
key_file>         # <- 按回车健选择默认

Option key_file_pass.
The passphrase to decrypt the PEM-encoded private key file.
Only PEM encrypted key files (old OpenSSH format) are supported. Encrypted keys
in the new OpenSSH format can't be used.
Choose an alternative below. Press Enter for the default (n).
y) Yes, type in my own password
g) Generate random password
n) No, leave this optional password blank (default)
y/g/n>         # <- 按回车健选择默认

Option pubkey_file.
Optional path to public key file.
Set this if you have a signed certificate you want to use for authentication.
Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.
Enter a value. Press Enter to leave empty.
pubkey_file>         # <- 按回车健选择默认

Option key_use_agent.
When set forces the usage of the ssh-agent.
When key-file is also set, the ".pub" file of the specified key-file is read and only the associated key is
requested from the ssh-agent. This allows to avoid `Too many authentication failures for *username*` errors
when the ssh-agent contains many keys.
Enter a boolean value (true or false). Press Enter for the default (false).
key_use_agent>         # <- 按回车健选择默认

Option use_insecure_cipher.
Enable the use of insecure ciphers and key exchange methods.
This enables the use of the following insecure ciphers and key exchange methods:
- aes128-cbc
- aes192-cbc
- aes256-cbc
- 3des-cbc
- diffie-hellman-group-exchange-sha256
- diffie-hellman-group-exchange-sha1
Those algorithms are insecure and may allow plaintext data to be recovered by an attacker.
Choose a number from below, or type in your own boolean value (true or false).
Press Enter for the default (false).
 1 / Use default Cipher list.
   \ (false)
 2 / Enables the use of the aes128-cbc cipher and diffie-hellman-group-exchange-sha256, diffie-hellman-group-exchange-sha1 key exchange.
   \ (true)
use_insecure_cipher>         # <- 按回车健选择默认

Option disable_hashcheck.
Disable the execution of SSH commands to determine if remote file hashing is available.
Leave blank or set to false to enable hashing (recommended), set to true to disable hashing.
Enter a boolean value (true or false). Press Enter for the default (false).
disable_hashcheck>         # <- 按回车健选择默认

Edit advanced config?
y) Yes
n) No (default)
y/n>         # <- 按回车健选择默认

Configuration complete.
Options:
- type: sftp
- host: nas.x0x.cn
- user: root
- port: 11113
- pass: *** ENCRYPTED ***
Keep this "sftps" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>         # <- 按回车健选择默认

到此完已成连接设置添加

Current remotes:

Name                 Type
====                 ====
sftp                 sftp
smb                  smb
webdav               webdav

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q>
创建挂载脚本

新建文本文档,输入内容:

dim objShell 
set objShell=wscript.createObject("WScript.Shell") 
iReturnCode=objShell.Run(".\rclone.exe mount sftp:/mnt o: --cache-dir %SystemRoot%\TEMP --allow-other --vfs-cache-mode writes --vfs-cache-max-age 60s  --allow-non-empty",0,TRUE)
备注:sftp:/mnt 指定挂载目录

另存为 mount-SFTP.vbs ,与rclone.exe,及rclone.conf 放在同一目录

创建卸载脚本
新建文本文档,输入内容:

set ws=createobject("wscript.shell")
   ws.run "taskkill /f /im rclone.exe",hide 
另存为 End-uount.vbs ,与rclone.exe,及rclone.conf 放在同一目录

挂载目录
双击mount-SFTP.vbs执行挂载操作,并刷新资源管理器
挂载目录
双击mount-SFTP.vbs执行挂载操作,并刷新资源管理器