Man page - ipsec-showhostkey(8)
Packages contas this manual
- ipsec-briefstatus(8)
- ipsec-checknflog(8)
- ipsec-listall(8)
- ipsec-showstates(8)
- ipsec-up(8)
- ipsec-add(8)
- ipsec-route(8)
- ipsec-_plutorun(8)
- ipsec-stop(8)
- ipsec-listcrls(8)
- ipsec-listcacerts(8)
- ipsec-initnss(8)
- ipsec-checkconfig(8)
- ipsec-whack(8)
- ipsec-fetchcrls(8)
- ipsec-readwriteconf(8)
- ipsec-checknss(8)
- ipsec-connectionstatus(8)
- ipsec.secrets(5)
- ipsec-delete(8)
- ipsec-ecdsasigkey(8)
- ipsec-_updown(8)
- ipsec-_updown.xfrm(8)
- ipsec-rereadsecrets(8)
- ipsec-_stackmanager(8)
- ipsec-start(8)
- ipsec-briefconnectionstatus(8)
- ipsec-showhostkey(8)
- ipsec-pluto(8)
- ipsec-algparse(8)
- ipsec-newhostkey(8)
- ipsec-globalstatus(8)
- ipsec-listcerts(8)
- pluto(8)
- ipsec-modutil(8)
- ipsec-showroute(8)
- ipsec-import(8)
- ipsec-crlutil(8)
- ipsec-restart(8)
- ipsec-fipsstatus(8)
- ipsec-status(8)
- ipsec.conf(5)
- ipsec-purgeocsp(8)
- ipsec-listpubkeys(8)
- ipsec-certutil(8)
- libreswan(7)
- ipsec-ondemand(8)
- ipsec-down(8)
- ipsec-vfychain(8)
- ipsec-trafficstatus(8)
- ipsec-unroute(8)
- ipsec(8)
- ipsec-letsencrypt(8)
- ipsec-setup(8)
- ipsec-rereadcerts(8)
- ipsec-shuntstatus(8)
- ipsec-addconn(8)
- ipsec-pk12util(8)
- ipsec-redirect(8)
- ipsec-rereadall(8)
- ipsec-listen(8)
- ipsec-rsasigkey(8)
- ipsec-replace(8)
apt-get install libreswan
Manual
| IPSEC-SHOWHOSTKEY(8) | Executable programs | IPSEC-SHOWHOSTKEY(8) |
NAME
ipsec-showhostkey - show host's authentication key
SYNOPSIS
ipsec showhostkey [--verbose]
{--version | --list | --dump | --left | --right | --ipseckey | --pem}
[--ckaid ckaid | --rsaid rsaid]
[--gateway gateway] [--precedence precedence]
[--nssdir nssdir] [--password password]
DESCRIPTION
Showhostkey 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.
In general, since only the super-user can access the NSS database, only the super-user can display the public key information.
Common Options
--version
--verbose
--nssdir nssdir
--password password
List Options
--list
--dump
Public Key Options
--ckaid ckaid
--rsaid rsaid
--pem
--left, --right
--ipseckey
For example, --ipseckey --gateway 10.11.12.13 might give (with the key data trimmed for clarity):
--gateway gateway
--precedence precedence
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
/var/lib/ipsec/nss, /etc/ipsec.d/nsspassword
SEE ALSO
ipsec.conf(5), ipsec-rsasigkey(8), ipsec-newhostkey(8)
HISTORY
Written for the Linux FreeS/WAN project <https://www.freeswan.org> by Henry Spencer. Updated by Paul Wouters for the IPSECKEY format.
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.
AUTHOR
Paul Wouters
| 05/04/2025 | Libreswan 5.2 |