xref: /netbsd-src/usr.sbin/puffs/mount_psshfs/mount_psshfs.8 (revision 50728e7823a76d5bd1a7bfa3a4eac400269b1339)
1.\"	$NetBSD: mount_psshfs.8,v 1.17 2008/09/06 12:29:57 pooka Exp $
2.\"
3.\" Copyright (c) 2007 Antti Kantee.  All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.Dd September 6, 2008
27.Dt MOUNT_PSSHFS 8
28.Os
29.Sh NAME
30.Nm mount_psshfs
31.Nd sshfs implementation for puffs
32.Sh SYNOPSIS
33.Nm
34.Op Ar options
35.Ar user@host[:path]
36.Ar mount_point
37.Sh DESCRIPTION
38The
39.Nm
40utility can be used to mount a file system using the ssh sftp
41subprotocol, making a remote directory hierarchy appear in the
42local directory tree.
43This functionality is commonly known as
44.Em sshfs .
45.Pp
46The mandatory parameters are the target host name and local mount
47point.
48The target host parameter can optionally contain a username whose
49credentials will be used by the remote sshd, and a relative or
50absolute path for the remote mount point's root.
51If no user is given, the credentials of the user issuing the mount
52command are used.
53If no path is given, the user's home directory on the remote machine
54will be used.
55.Pp
56The following command line options are available:
57.Pp
58.Bl -tag -width xxx
59.It Fl e
60Makes the mounted file system NFS exportable.
61If this option is used, it is very important to understand that
62.Nm
63can not provide complete support for NFS due to the limitations in
64the backend.
65Files are valid only for the time that
66.Nm
67is running and in the event of e.g. a server crash, all client retries
68to access files will fail.
69.It Fl F Ar configfile
70Pass a configuration file to
71.Xr ssh 1 .
72This will make it ignore the system-wide
73.Pa /etc/ssh/ssh_config
74configuration file and use
75.Pa configfile
76instead of
77.Pa ~/.ssh/config .
78.It Fl o Ar [no]option
79This flag can be used to give standard mount options and options
80to puffs.
81.It Fl O Ar sshopt=value
82Pass an option to
83.Xr ssh 1 ,
84for example
85.Fl O Ar Port=22 .
86For a list of valid options, see
87.Xr ssh_config 5 .
88.It Fl p
89Preserve connection.
90This option makes
91.Nm
92to try to reconnect to the server if the connection fails.
93The option is very experimental and does not preserve open files
94or retry current requests and should generally only be used if the
95trade-offs are well understood.
96.It Fl r Ar max_reads
97Limits maximum outstanding read requests for each node to
98.Ar max_reads .
99This can be used to improve interactive performance on low-bandwidth links
100when also performing bulk data reads.
101.It Fl s
102This flag can be used to make the program stay on top.
103The default is to detach from the terminal and run in the background.
104.It Fl t Ar timeout
105By default
106.Nm
107caches directory contents and node attributes for 30 seconds before
108re-fetching from the server to check if anything has changed on
109the server.
110This option is used to adjust the timeout period to
111.Ar timeout
112seconds.
113A value 0 means the cache is never valid and \-1 means it is
114valid indefinitely.
115It is possible to force a re-read regardless of timeout status by sending
116.Dv SIGHUP
117to the
118.Nm
119process.
120.Pp
121Note: the file system will still free nodes when requested by the
122kernel and will lose all cached information in doing so.
123How frequently this happens depends on system activity and the total
124number of available vnodes in the system (kern.maxvnodes).
125.El
126.Sh EXAMPLES
127The following example illustrates how to mount the directory
128.Em /usr
129on server
130.Em bigiron
131as user
132.Em abc
133on local directory
134.Em /mnt
135with ssh transport compression enabled:
136.Bd -literal -offset indent
137mount_psshfs -O Compression=yes abc@bigiron:/usr /mnt
138.Ed
139.Pp
140It is possible to use
141.Xr fstab 5
142for psshfs mounts, with SSH public key authentication:
143.Pp
144.Dl "abc@bigiron:/usr /mnt psshfs rw,noauto,-O=BatchMode=yes,-O=IdentityFile=/root/.ssh/id_rsa,-t=-1"
145.Sh SEE ALSO
146.Xr sftp 1 ,
147.Xr puffs 3 ,
148.Xr puffs 4 ,
149.Xr fstab 5 ,
150.Xr ssh_config 5 ,
151.Xr mount 8 ,
152.Xr sshd 8
153.Sh HISTORY
154The
155.Nm
156utility first appeared in
157.Nx 5.0 .
158.Sh CAVEATS
159Permissions are not handled.
160Do not expect the file system to behave except for a single user.
161