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