OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / freeswan / doc / manpage.d / ipsec_showhostkey.8.html
1 Content-type: text/html
2
3 <HTML><HEAD><TITLE>Manpage of IPSEC_SHOWHOSTKEY</TITLE>
4 </HEAD><BODY>
5 <H1>IPSEC_SHOWHOSTKEY</H1>
6 Section: Maintenance Commands (8)<BR>Updated: 11 June 2001<BR><A HREF="#index">Index</A>
7 <A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
8
9
10 <A NAME="lbAB">&nbsp;</A>
11 <H2>NAME</H2>
12
13 ipsec showhostkey - show host's authentication key
14 <A NAME="lbAC">&nbsp;</A>
15 <H2>SYNOPSIS</H2>
16
17 <B>ipsec</B>
18
19 <B>showhostkey</B>
20
21 [
22 <B>--left</B>
23
24 ] [
25 <B>--right</B>
26
27 ] [
28 <B>--txt</B>
29
30 gateway
31 ] [
32 <B>--file</B>
33
34 secretfile
35 ] [
36 <B>--id</B>
37
38 identity
39 ]
40 <A NAME="lbAD">&nbsp;</A>
41 <H2>DESCRIPTION</H2>
42
43 <I>Showhostkey</I>
44
45 outputs (on standard output) a public key suitable for this host,
46 using the host key information stored in
47 <I>/etc/ipsec.secrets</I>.
48
49 In general only the super-user can run this command,
50 since only he can read
51 <I>ipsec.secrets</I>.
52
53 <P>
54
55 By default, the output format is the text form of a DNS KEY record;
56 the host name is the one included in the key information
57 (or, if that is not available,
58 the output of
59 <B>hostname&nbsp;--fqdn</B>),
60
61 with a
62 <B>.</B>
63
64 appended.
65 If information about how the key was generated is available,
66 that is provided as a DNS-file comment.
67 For example (with the key data trimmed down for clarity):
68 <P>
69
70 <PRE>
71   ; RSA 2048 bits   xy.example.com   Sat Apr 15 13:53:22 2000
72   xy.example.com.   IN   KEY   0x4200 4 1 AQOF8tZ2...+buFuFn/
73 </PRE>
74
75 <P>
76
77 The
78 <B>--txt</B>
79
80 option causes the output to be in opportunistic-encryption DNS TXT record
81 format,
82 with the specified
83 <I>gateway</I>
84
85 value.
86 Again, generation information is included if available.
87 For example,
88 <B>--txt 10.11.12.13</B>
89
90 might give (with the key data trimmed for clarity):
91 <P>
92
93 <PRE>
94   ; RSA 2048 bits   xy.example.com   Sat Apr 15 13:53:22 2000
95       IN TXT  &quot;X-IPsec-Server(10)=10.11.12.13 AQOF8tZ2...+buFuFn/&quot;
96 </PRE>
97
98 <P>
99
100 No name is supplied in the TXT record
101 because there are too many possibilities,
102 depending on how it will be used.
103 <P>
104
105 The
106 <B>--left</B>
107
108 and
109 <B>--right</B>
110
111 options cause the output to be in
112 <I><A HREF="ipsec.conf.5.html">ipsec.conf</A></I>(5)
113
114 format, as a
115 <B>leftrsasigkey</B>
116
117 or
118 <B>rightrsasigkey</B>
119
120 parameter respectively.
121 Again, generation information is included if available.
122 For example,
123 <B>--left</B>
124
125 might give (with the key data trimmed down for clarity):
126 <P>
127
128 <PRE>
129   # RSA 2048 bits   xy.example.com   Sat Apr 15 13:53:22 2000
130   leftrsasigkey=0x0103cc2a86fcf440...cf1011abb82d1
131 </PRE>
132
133 <P>
134
135 Normally, the default key for this host is the one extracted.
136 The
137 <B>--id</B>
138
139 option overrides this,
140 causing extraction of the key labeled with the specified
141 <I>identity</I>,
142
143 if any.
144 <P>
145
146 The
147 <B>--file</B>
148
149 option overrides the default for where the key information should be
150 found, and takes it from the specified
151 <I>secretfile</I>.
152
153 <A NAME="lbAE">&nbsp;</A>
154 <H2>DIAGNOSTICS</H2>
155
156 A complaint about ``no IN KEY line found'' indicates that the
157 host has a key but it was generated with an old version of FreeS/WAN
158 and does not contain the information that
159 <I>showhostkey</I>
160
161 needs.
162 <A NAME="lbAF">&nbsp;</A>
163 <H2>FILES</H2>
164
165 /etc/ipsec.secrets
166 <A NAME="lbAG">&nbsp;</A>
167 <H2>SEE ALSO</H2>
168
169 <A HREF="ipsec.secrets.5.html">ipsec.secrets</A>(5), <A HREF="ipsec.conf.5.html">ipsec.conf</A>(5), <A HREF="ipsec_rsasigkey.8.html">ipsec_rsasigkey</A>(8)
170 <A NAME="lbAH">&nbsp;</A>
171 <H2>HISTORY</H2>
172
173 Written for the Linux FreeS/WAN project
174 &lt;<A HREF="http://www.freeswan.org">http://www.freeswan.org</A>&gt;
175 by Henry Spencer.
176 <A NAME="lbAI">&nbsp;</A>
177 <H2>BUGS</H2>
178
179 Arguably,
180 rather than just reporting the no-IN-KEY-line-found problem,
181 <I>showhostkey</I>
182
183 should be smart enough to run the existing key through
184 <I>rsasigkey</I>
185
186 with the
187 <B>--oldkey</B>
188
189 option, to generate a suitable output line.
190 <P>
191
192 The need to specify the gateway address (etc.) for
193 <B>--txt</B>
194
195 is annoying, but there is no good way to determine it automatically.
196 <P>
197
198 There should be a way to specify the priority value for TXT records;
199 currently it is hardwired to
200 <B>10</B>.
201
202 <P>
203
204 The
205 <B>--id</B>
206
207 option assumes that the
208 <I>identity</I>
209
210 appears on the same line as the
211 <B>:&nbsp;RSA&nbsp;{</B>
212
213 that begins the key proper.
214 <P>
215
216 <HR>
217 <A NAME="index">&nbsp;</A><H2>Index</H2>
218 <DL>
219 <DT><A HREF="#lbAB">NAME</A><DD>
220 <DT><A HREF="#lbAC">SYNOPSIS</A><DD>
221 <DT><A HREF="#lbAD">DESCRIPTION</A><DD>
222 <DT><A HREF="#lbAE">DIAGNOSTICS</A><DD>
223 <DT><A HREF="#lbAF">FILES</A><DD>
224 <DT><A HREF="#lbAG">SEE ALSO</A><DD>
225 <DT><A HREF="#lbAH">HISTORY</A><DD>
226 <DT><A HREF="#lbAI">BUGS</A><DD>
227 </DL>
228 <HR>
229 This document was created by
230 <A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
231 using the manual pages.<BR>
232 Time: 05:09:33 GMT, June 19, 2001
233 </BODY>
234 </HTML>