]> git.lizzy.rs Git - plan9front.git/blob - sys/man/4/sshfs
merge
[plan9front.git] / sys / man / 4 / sshfs
1 .TH SSHFS 4
2 .SH NAME
3 sshfs - secure file transfer protocol client
4 .SH SYNOPSIS
5 .B sshfs
6 [
7 .B -abdRUGM
8 ]
9 [
10 .B -s
11 .I service
12 ]
13 [
14 .B -m
15 .I mtpt
16 ]
17 [
18 .B -r
19 .I root
20 ]
21 [
22 .B -u
23 .I uidfile
24 ]
25 [
26 .B -g
27 .I gidfile
28 ]
29 .IP ""
30 [
31 .B --
32 .I ssh-options
33 ]
34 .I [user@]host
35 |
36 .B -c
37 .I cmdline
38 |
39 .B -p
40 .SH DESCRIPTION
41 .I Sshfs
42 makes the file system on a remote host accessible through the secure file transfer protocol (SFTP).
43 By default
44 .I sshfs
45 launches
46 .IR ssh (1)
47 to connect to
48 .I host
49 and log in as
50 .I user.
51 If
52 .B -c
53 is specified,
54 .I sshfs
55 will instead launch the command specified by
56 .IR cmdline
57 and if
58 .B -p
59 is specified,
60 .I sshfs
61 communicates with an SFTP server via stdin and stdout.
62 .PP
63 Unless
64 .B -M
65 is specified,
66 .I sshfs
67 will mount itself under the mountpoint specified by
68 .IR mtpt ,
69 or under
70 .B /n/ssh
71 if
72 .B -m
73 is not specified.
74 The default mount options are equivalent to calling
75 .I mount
76 (see
77 .IR bind (1))
78 with
79 .BR -c .
80 .B -a
81 and
82 .B -b
83 have the same function as they do with
84 .IR mount .
85 The default remote root is the user's home directory but can be changed with
86 .BR -r .
87 .PP
88 If
89 .B -s
90 is specified,
91 it will post itself in
92 .IR srv (3)
93 with service name
94 .IR service .
95 If the service file is mounted, the
96 .IR attach (5)
97 name can be used to specify which directory on the remote host will be mounted.
98 If it is omitted or empty, the user's home directory is used.
99 Relative paths are also relative to this directory.
100 .PP
101 Since the only supported version 3 of the SFTP protocol has no way to look up numeric user and group IDs,
102 .I sshfs
103 will read the files
104 .B /etc/passwd
105 and
106 .B /etc/group
107 on the remote host to create a lookup table for them.
108 The location of these files can be changed with
109 .B -u
110 and
111 .BR -g,
112 whereas
113 .B -U
114 and
115 .B -G
116 will inhibit reading them entirely.
117 If these files cannot be accessed for any reason, numeric IDs simply remain untranslated.
118 .PP
119 Further options:
120 .TP
121 -R
122 Read access only.
123 .TP
124 -d
125 Enable debugging output.
126 .SH SOURCE
127 .B /sys/src/cmd/sshfs.c
128 .SH BUGS
129 Currently only version 3 of the SFTP protocol is supported (which is the most common version in use and the latest supported by openssh).
130 Unfortunately there are problems with the version 3 specification and the code relies on openssh-specific behaviour in some corner cases.
131 Version 4 and later also handle uid/gid translation at the server end which would remove the ugly dependence on reading remote configuration files.
132 .PP
133 Some 9P operations that should be atomic are not atomic because they do not map 1:1 to SFTP operations.
134 In particular there is no guarantee that a failed
135 .I wstat
136 (see
137 .IR stat (5))
138 did not change some of the fields.
139 .PP
140 The code is naive about links and assumes files with distinct names to be distinct, assigning them different QIDs.
141 .PP
142 File names with null bytes in them will confuse
143 .I sshfs.
144 .I Sshfs
145 should probably escape them, as well as control characters that might confuse other software.
146 .SH HISTORY
147 .I
148 Sshfs
149 first appeared in 9front (Apr, 2017).
150 .SH SEE ALSO
151 .IR ssh (1)