]> git.lizzy.rs Git - plan9front.git/blob - sys/man/4/sshfs
sshfs: add -r and -M options
[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 .IR mount (1)
76 with
77 .BR -c .
78 .B -a
79 and
80 .B -b
81 have the same function as they do with
82 .IR mount (1).
83 The default remote root is the user's home directory but can be changed with
84 .BR -r .
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
94 .IR attach (5)
95 name can be used to specify which directory on the remote host will be mounted.
96 If it is omitted or empty, the user's home directory is used.
97 Relative paths are also relative to this directory.
98 .PP
99 Since the only supported version 3 of the SFTP protocol has no way to look up numeric user and group IDs,
100 .I sshfs
101 will read the files
102 .B /etc/passwd
103 and
104 .B /etc/group
105 on the remote host to create a lookup table for them.
106 The location of these files can be changed with
107 .B -u
108 and
109 .BR -g,
110 whereas
111 .B -U
112 and
113 .B -G
114 will inhibit reading them entirely.
115 If these files cannot be accessed for any reason, numeric IDs simply remain untranslated.
116 .PP
117 Further options:
118 .TP
119 -R
120 Read access only.
121 .TP
122 -d
123 Enable debugging output.
124 .SH SOURCE
125 .B /sys/src/cmd/sshfs.c
126 .SH BUGS
127 Currently only version 3 of the SFTP protocol is supported (which is the most common version in use and the latest supported by openssh).
128 Unfortunately there are problems with the version 3 specification and the code relies on openssh-specific behaviour in some corner cases.
129 Version 4 and later also handle uid/gid translation at the server end which would remove the ugly dependence on reading remote configuration files.
130 .PP
131 Some 9P operations that should be atomic are not atomic because they do not map 1:1 to SFTP operations.
132 In particular there is no guarantee that a failed
133 .IR wstat (5)
134 did not change some of the fields.
135 .PP
136 The code is naive about links and assumes files with distinct names to be distinct, assigning them different QIDs.
137 .PP
138 File names with null bytes in them will confuse
139 .I sshfs.
140 .I Sshfs
141 should probably escape them, as well as control characters that might confuse other software.
142 .SH HISTORY
143 .I
144 Sshfs
145 first appeared in 9front (Apr, 2017).
146 .SH SEE ALSO
147 .IR ssh(1)