table of contents
other versions
- wheezy 1:2.6.37-3+deb7u1
IPSEC_SHOWHOSTKEY(8) | [FIXME: manual] | IPSEC_SHOWHOSTKEY(8) |
NAME¶
ipsec_showhostkey - show host´s authentication keySYNOPSIS¶
ipsec
showhostkey [--ipseckey [gateway]] [--left] [--right]
[--dump] [--verbose] [--version] [--list] [--x509self] [--x509req]
[--x509cert] [--txt gateway] [--dhclient]
[--file secretfile] [--keynum count]
[--id identity]
DESCRIPTION¶
Showhostkey outputs (on standard output) a public key suitable for this host, in the format specified, using the host key information stored in /etc/ipsec.secrets. In general only the super-user can run this command, since only he can read ipsec.secrets. The --txt option causes the output to be in opportunistic-encryption DNS TXT record format, with the specified gateway value. If information about how the key was generated is available, that is provided as a DNS-file comment. For example, --txt 10.11.12.13 might give (with the key data trimmed for clarity):; RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000 IN TXT "X-IPsec-Server(10)=10.11.12.13 AQOF8tZ2...+buFuFn/"
# RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000 leftrsasigkey=0sAQOF8tZ2...+buFuFn/
; RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000 xy.example.com. IN IPSECKEYKEY floyd albert
; RSA 2048 bits xy.example.com Sat Apr 15 13:53:22 2000 xy.example.com. IN KEY 0x4200 4 1 AQOF8tZ2...+buFuFn/
DIAGNOSTICS¶
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 showhostkey needs.FILES¶
/etc/ipsec.secretsSEE ALSO¶
ipsec. secrets(5), ipsec.conf(5), ipsec_rsasigkey(8)HISTORY¶
Written for the Linux FreeS/WAN project < http://www.freeswan.org> by Henry Spencer.BUGS¶
Arguably, rather than just reporting the no-IN-KEY-line-found problem, showhostkey should be smart enough to run the existing key through rsasigkey with the --oldkey option, to generate a suitable output line. The need to specify the gateway address (etc.) for --txt is annoying, but there is no good way to determine it automatically. There should be a way to specify the priority value for TXT records; currently it is hardwired to 10. The --id option assumes that the identity appears on the same line as the : RSA { that begins the key proper.10/06/2010 | [FIXME: source] |