]> 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 at the mountpoint specified by
68 .IR mtpt ,
69 or at
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 .PP
86 If
87 .B -s
88 is specified,
89 it will post itself in
90 .IR srv (3)
91 with service name
92 .IR service .
93 If the service file is mounted, the attach name (the third argument to
94 .IR mount (1))
95 can be used to specify which directory on the remote host will be mounted.
96 .PP
97 By default, relative paths are assumed relative to the user's home directory.
98 The
99 .B -r
100 option can be used to specify an alternative base for relative paths.
101 The initial mount at
102 .B -m
103 also uses this directory.
104 If an attach name starts with
105 .BR ~ ,
106 the user's home directory is substituted for
107 .BR ~ .
108 .PP
109 Since the only supported version 3 of the SFTP protocol has no way to look up numeric user and group IDs,
110 .I sshfs
111 will read the files
112 .B /etc/passwd
113 and
114 .B /etc/group
115 on the remote host to create a lookup table for them.
116 The location of these files can be changed with
117 .B -u
118 and
119 .BR -g,
120 whereas
121 .B -U
122 and
123 .B -G
124 will inhibit reading them entirely.
125 If these files cannot be accessed for any reason, numeric IDs simply remain untranslated.
126 .PP
127 Further options:
128 .TP
129 -R
130 Read access only.
131 .TP
132 -d
133 Enable debugging output.
134 .SH SOURCE
135 .B /sys/src/cmd/sshfs.c
136 .SH BUGS
137 Currently only version 3 of the SFTP protocol is supported (which is the most common version in use and the latest supported by openssh).
138 Unfortunately there are problems with the version 3 specification and the code relies on openssh-specific behaviour in some corner cases.
139 Version 4 and later also handle uid/gid translation at the server end which would remove the ugly dependence on reading remote configuration files.
140 .PP
141 Some 9P operations that should be atomic are not atomic because they do not map 1:1 to SFTP operations.
142 In particular there is no guarantee that a failed
143 .I wstat
144 (see
145 .IR stat (5))
146 did not change some of the fields.
147 .PP
148 The code is naive about links and assumes files with distinct names to be distinct, assigning them different QIDs.
149 .PP
150 File names with null bytes in them will confuse
151 .I sshfs.
152 .I Sshfs
153 should probably escape them, as well as control characters that might confuse other software.
154 .SH HISTORY
155 .I
156 Sshfs
157 first appeared in 9front (Apr, 2017).
158 .SH SEE ALSO
159 .IR ssh (1)