You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration/vfs.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,19 +11,23 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
11
11
If you want to fine-tune the default settings, the first step is to [create your own configuration file](/docs/configuration/overview).
12
12
:::
13
13
14
-
You can register any supported virtual file service in your `vfs.toml`, for example:
14
+
You can register any supported VFS provider in your `vfs.toml` as a service, for example:
15
15
16
16
```toml
17
-
[providers.my-server]
17
+
[services.my-server]
18
18
type = "sftp"
19
19
host = "1.2.3.4"
20
20
user = "root"
21
21
port = 22
22
22
```
23
23
24
-
The provider here is `my-server`, you can use any other name you like in [kebab-case](https://developer.mozilla.org/en-US/docs/Glossary/Kebab_case), up to 20 characters.
24
+
The service here is `my-server`, you can use any other name you like in [kebab-case](https://developer.mozilla.org/en-US/docs/Glossary/Kebab_case), up to 20 characters.
25
25
26
-
Once registered, you can access them by the combination of provider type and name, for example, to start Yazi with the SFTP provider `my-server` as the working directory:
26
+
Different names are considered as different virtual filesystems, even if they are configured with the same provider and exactly the same parameters.
27
+
28
+
## Usage
29
+
30
+
Once registered, you can access them by the combination of provider type and name, for example, to start Yazi with the SFTP service `my-server` as the working directory:
27
31
28
32
```sh
29
33
yazi sftp://my-server
@@ -47,14 +51,14 @@ run = "reveal sftp://my-server//root/dog.jpg"
47
51
desc = "Reveal dog.jpg on my-server"
48
52
```
49
53
50
-
## SFTP
54
+
## SFTP Provider
51
55
52
56
Yazi has an SFTP VFS provider built-in, which means you can manage files on remote servers over SSH.
53
57
54
58
To register an SFTP VFS named `my-server`, add the following to your `vfs.toml`:
55
59
56
60
```toml
57
-
[providers.my-server]
61
+
[services.my-server]
58
62
type = "sftp"
59
63
host = "1.2.3.4"
60
64
user = "root"
@@ -68,7 +72,7 @@ On Unix-like systems the SSH agent is provided by `ssh-agent`. You can list the
68
72
If you don't want to use an agent and prefer to specify a private key file, add the `key_file` and `key_passphrase` options, for example:
69
73
70
74
```toml
71
-
[providers.my-server]
75
+
[services.my-server]
72
76
type = "sftp"
73
77
host = "1.2.3.4"
74
78
user = "root"
@@ -81,7 +85,7 @@ key_file = "~/.ssh/id_rsa"
81
85
You can also authenticate with a password using the `password` option:
82
86
83
87
```toml
84
-
[providers.my-server]
88
+
[services.my-server]
85
89
type = "sftp"
86
90
host = "1.2.3.4"
87
91
user = "root"
@@ -92,7 +96,7 @@ password = "my_password"
92
96
If you want to use an agent socket other than `$SSH_AUTH_SOCK`, for example, if you [manage SSH keys with 1Password](https://developer.1password.com/docs/ssh/manage-keys/), specify it with `identity_agent`:
0 commit comments