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 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<refentry>
<refmeta>
<refentrytitle>IPSEC-SHOWHOSTKEY</refentrytitle>
<manvolnum>8</manvolnum>
<refmiscinfo class='date'>29 April 2012</refmiscinfo>
<refmiscinfo class="source">Libreswan</refmiscinfo>
<refmiscinfo class="version">@@IPSECVERSION@@</refmiscinfo>
<refmiscinfo class="manual">Executable programs</refmiscinfo>
</refmeta>
<refnamediv id='name'>
<refname>ipsec-showhostkey</refname>
<refpurpose>show host's authentication key</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
<command>ipsec showhostkey</command>
<arg>--verbose</arg>
<arg choice='req'>
<group choice='plain'>
<arg choice='plain'>--version</arg>
<arg choice='plain'>--list</arg>
<arg choice='plain'>--dump</arg>
<arg choice='plain'>--left</arg>
<arg choice='plain'>--right</arg>
<arg choice='plain'>--ipseckey</arg>
<arg choice='plain'>--pem</arg>
</group>
</arg>
<sbr/>
<arg choice='opt'>
<group choice='plain'>
<arg choice='plain'>--ckaid <replaceable>ckaid</replaceable></arg>
<arg choice='plain'>--rsaid <replaceable>rsaid</replaceable></arg>
</group>
</arg>
<sbr/>
<arg>--gateway <replaceable>gateway</replaceable></arg>
<arg>--precedence <replaceable>precedence</replaceable></arg>
<sbr/>
<arg>--nssdir <replaceable>nssdir</replaceable></arg>
<arg>--password <replaceable>password</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 id='description'>
<title>DESCRIPTION</title>
<para>
<emphasis>Showhostkey</emphasis> outputs (on standard
output) a public key suitable for this host, in the format
specified, using the host key information stored in the NSS
database.
</para>
<para>
In general, since only the super-user can access the NSS database,
only the super-user can display the public key information.
</para>
<refsect2>
<title>Common Options</title>
<variablelist>
<varlistentry>
<term>
<option>--version</option>
</term>
<listitem>
<para>
Print the libreswan version, then exit.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--verbose</option>
</term>
<listitem>
<para>
Increase the verbosity.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--nssdir <replaceable>nssdir</replaceable></option>
</term>
<listitem>
<para>
Specify the libreswan directory that
contains the NSS database (default
<filename>@@IPSEC_NSSDIR@@</filename>).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--password <replaceable>password</replaceable></option>
</term>
<listitem>
<para>
Specify the password to use when accessing the NSS
database (default contained in
<filename>@@IPSEC_CONFDDIR@@/nsspassword</filename>).
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>List Options</title>
<variablelist>
<varlistentry>
<term>
<option>--list</option>
</term>
<listitem>
<para>
List the private keys.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--dump</option>
</term>
<listitem>
<para>
List, with more details, the private keys.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>Public Key Options</title>
<variablelist>
<varlistentry>
<term>
<option>--ckaid <replaceable>ckaid</replaceable></option>
</term>
<listitem>
<para>
Select the public key to display using the NSS ckaid.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--rsaid <replaceable>rsaid</replaceable></option>
</term>
<listitem>
<para>
Select the public key to display using the RSA key ID.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--pem</option>
</term>
<listitem>
<para>
Print the selected public key in PEM encoded ASN.1 format.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--left</option>
</term>
<term>
<option>--right</option>
</term>
<listitem>
<para>
Print the selected public key in
<citerefentry><refentrytitle>ipsec.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
format, as a <emphasis>leftrsasigkey</emphasis>
or <emphasis>rightrsasigkey</emphasis> parameter
respectively. For example, <option>--left</option> might
give (with the key data trimmed down for clarity):
</para>
<para>
<simplelist columns='1'>
<member><computeroutput>leftrsasigkey=0sAQOF8tZ2...+buFuFn/</computeroutput></member>
</simplelist>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--ipseckey</option>
</term>
<listitem>
<para>
Print the selected public key in a format suitable for use
as opportunistic-encryption DNS IPSECKEY record format
(RFC 4025). A gateway can be specified with the
<option>--gateway</option>, which currently supports IPv4
and IPv6 addresses. For the host name, the value returned
by <emphasis>gethostname</emphasis> is used, with a
<emphasis>.</emphasis> appended.
</para>
<para>
For example, <option>--ipseckey --gateway
10.11.12.13</option> might give (with the key data trimmed
for clarity):
</para>
<para>
<simplelist columns='1'>
<member><computeroutput>IN IPSECKEY 10 1 2 10.11.12.13 AQOF8tZ2...+buFuFn/"</computeroutput></member>
</simplelist>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--gateway <replaceable>gateway</replaceable></option>
</term>
<listitem>
<para>
For <option>--ipseckey</option>, specify the
<replaceable>gateway</replaceable> to display with the DNS
IPSECKEY record.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--precedence <replaceable>precedence</replaceable></option>
</term>
<listitem>
<para>
For <option>--ipseckey</option>, specify the
<replaceable>precedence</replaceable> to display with the DNS
IPSECKEY record.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
<refsect1 id='diagnostics'>
<title>DIAGNOSTICS</title>
<para>
A complaint about “no pubkey line found” indicates
that the host has a key but it was generated with an old version
of FreeS/WAN and does not contain the information that
<emphasis>showhostkey</emphasis> needs.
</para>
</refsect1>
<refsect1 id='files'>
<title>FILES</title>
<para>
<filename>@@IPSEC_NSSDIR@@</filename>,
<filename>@@IPSEC_CONFDDIR@@/nsspassword</filename>
</para>
</refsect1>
<refsect1 id='see_also'>
<title>SEE ALSO</title>
<para>
<citerefentry><refentrytitle>ipsec.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>ipsec-rsasigkey</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>ipsec-newhostkey</refentrytitle><manvolnum>8</manvolnum></citerefentry>
</para>
</refsect1>
<refsect1 id='history'>
<title>HISTORY</title>
<para>
Written for the Linux FreeS/WAN project <<ulink
url='https://www.freeswan.org'>https://www.freeswan.org</ulink>>
by Henry Spencer. Updated by Paul Wouters for the IPSECKEY
format.
</para>
</refsect1>
<refsect1 id='bugs'>
<title>BUGS</title>
<para>
Arguably, rather than just reporting the no-IN-KEY-line-found
problem, <command>showhostkey</command> should be
smart enough to run the existing key through <emphasis>rsasigkey</emphasis>
with the <option>--oldkey</option> option, to generate a suitable output
line.
</para>
</refsect1>
<refsect1 id='author'>
<title>AUTHOR</title>
<para>
<author><personname><firstname>Paul</firstname><surname>Wouters</surname></personname></author>
</para>
</refsect1>
</refentry>
|