1 .\" Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
3 .\" Permission is hereby granted, free of charge, to any person obtaining a
4 .\" copy of this software and associated documentation files (the "Software"),
5 .\" to deal in the Software without restriction, including without limitation
6 .\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 .\" and/or sell copies of the Software, and to permit persons to whom the
8 .\" Software is furnished to do so, subject to the following conditions:
10 .\" The above copyright notice and this permission notice (including the next
11 .\" paragraph) shall be included in all copies or substantial portions of the
14 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 .\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 .\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 .\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 .\" DEALINGS IN THE SOFTWARE.
22 .\" Copyright 1988, 1998 The Open Group
24 .\" Permission is hereby granted, free of charge, to any person obtaining a
25 .\" copy of this software and associated documentation files (the
26 .\" "Software"), to deal in the Software without restriction, including
27 .\" without limitation the rights to use, copy, modify, merge, publish,
28 .\" distribute, and/or sell copies of the Software, and to permit persons
29 .\" to whom the Software is furnished to do so, provided that the above
30 .\" copyright notice(s) and this permission notice appear in all copies of
31 .\" the Software and that both the above copyright notice(s) and this
32 .\" permission notice appear in supporting documentation.
34 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
35 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
37 .\" OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
38 .\" HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
39 .\" INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
40 .\" FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
41 .\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
42 .\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
44 .\" Except as contained in this notice, the name of a copyright holder
45 .\" shall not be used in advertising or otherwise to promote the sale, use
46 .\" or other dealings in this Software without prior written authorization
47 .\" of the copyright holder.
49 .\" X Window System is a trademark of The Open Group.
51 .TH XHOST 1 __xorgversion__
53 xhost \- server access control program for X
58 The \fIxhost\fP program
59 is used to add and delete host names or user names to the list allowed
60 to make connections to the X server. In the case of hosts, this provides
61 a rudimentary form of privacy control and security. It is only sufficient
62 for a workstation (single user) environment, although it does limit the
63 worst abuses. Environments which require more sophisticated measures should
64 implement the user-based mechanism or use the hooks in the
65 protocol for passing other authentication data to the server.
67 \fIXhost\fP accepts the following command line options described below. For
68 security, the options that affect access control may only be run from the
69 "controlling host". For workstations, this is the same machine as the
70 server. For X terminals, it is the login host.
73 Prints a usage message.
76 The given \fIname\fP (the plus sign is optional)
77 is added to the list allowed to connect to the X server.
78 The name can be a host name or a complete name (See
84 The given \fIname\fP is removed from the list of allowed
85 to connect to the server. The name can be a host name or a complete
90 Existing connections are not broken, but new
91 connection attempts will be denied.
92 Note that the current machine is allowed to be removed; however, further
93 connections (including attempts to add it back) will not be permitted.
94 Resetting the server (thereby breaking all connections)
95 is the only way to allow local connections again.
98 Access is granted to everyone, even if they aren't on the list
99 (i.e., access control is turned off).
102 Access is restricted to only those on the list
103 (i.e., access control is turned on).
106 If no command line arguments are given,
107 a message indicating whether or not access control is currently enabled
108 is printed, followed by the list of those allowed to connect.
109 This is the only option that may be used from machines other than
110 the controlling host.
112 A complete name has the syntax
113 ``family:name'' where the families are
118 inet Internet host (IPv4)
119 inet6 Internet host (IPv6)
121 nis Secure RPC network name
122 krb Kerberos V5 principal
123 local contains only one name, the empty string
124 si Server Interpreted
127 The family is case insensitive.
128 The format of the name varies with the family.
130 When Secure RPC is being used, the
131 network independent netname (e.g., "nis:unix.\fIuid\fP@\fIdomainname\fP") can
132 be specified, or a local user can be specified with just the username
133 and a trailing at-sign (e.g., "nis:pat@").
135 For backward compatibility with pre-R6 \fIxhost\fP,
136 names that contain an at-sign (@) are assumed to be in the nis family.
137 Otherwise they are assumed to be Internet addresses. If compiled to support
138 IPv6, then all IPv4 and IPv6 addresses returned by getaddrinfo(__libmansuffix__) are added to
139 the access list in the appropriate inet or inet6 family.
141 The local family specifies all the local connections at once. However,
142 the server interpreted address "si:localuser:\fIusername\fP" can be
143 used to specify a single local user. (See the
144 \fIXsecurity\fP(__miscmansuffix__) manual page for more details.)
146 Server interpreted addresses consist of a case-sensitive type tag and a
147 string representing a given value, separated by a colon. For example,
148 "si:hostname:almas" is a server interpreted address of type \fIhostname\fP,
149 with a value of \fIalmas\fP. For more information on the available forms
150 of server interpreted addresses, see the \fIXsecurity\fP(__miscmansuffix__)
153 The initial access control list for display number \fBn\fP
154 may be set by the file \fI/etc/X\fBn\fI.hosts\fR, where
155 \fBn\fP is the display number of the server. See \fIXserver\fP(__appmansuffix__)
158 For each name added to the access control list,
159 a line of the form "\fIname\fP being added to access control list"
161 For each name removed from the access control list,
162 a line of the form "\fIname\fP being removed from access control list"
165 X(__miscmansuffix__), Xsecurity(__miscmansuffix__), Xserver(__appmansuffix__), xdm(__appmansuffix__), xauth(__appmansuffix__), getaddrinfo(__libmansuffix__)
169 to get the default host and display to use.
172 You can't specify a display on the command line because
174 is a valid command line argument (indicating that you want
175 to remove the machine named
177 from the access list).
179 The X server stores network addresses, not host names, unless you use
180 the server-interpreted hostname type address. If somehow you change a
181 host's network address while the server is still running, and you are
182 using a network-address based form of authentication, \fIxhost\fP must
183 be used to add the new address and/or remove the old address.
185 Bob Scheifler, MIT Laboratory for Computer Science,
187 Jim Gettys, MIT Project Athena (DEC).