psktool(1)
π psktool β the GnuTLS PSK tool, bestie edition π
okay so picture this: you need random keys for TLS-PSK and you want a little tool to do it for you. That's psktool, from the GnuTLS family, and she is iconic. Keys get stored in hexadecimal format in a key file, and honestly? clean. simple. slay. β¨
β¨ SYNOPSIS β¨
psktool [-flags] [-flag [value]] [--option-name[[=| ]value]]
All arguments must be options. No sneaky positional args, she doesn't play like that. π
π¦ DESCRIPTION π¦
psktool is the program that generates random keys for use with TLS-PSK. The keys get written out in hexadecimal format into a key file. That's the whole vibe, and she eats every time. π
π OPTIONS π
-d num,--debug=numβ turn on debugging, bestie. This option takes an integer as its argument, andnumis constrained to being:- in the range
0through9999 - It specifies the debug level. Crank it up if you wanna see everything. π
- in the range
-s num,--keysize=numβ specify the key size in bytes. The default is32-bytes, which is also256-bits, iykyk. Takes an integer argument, andnumis constrained to being:- in the range
0through512
- in the range
-u str,--username=strβ specify the username to use. π«Ά-p str,--pskfile=strβ specify a pre-shared key file. This is the option that tellspsktoolwhich pre-shared key file to store the generated keys in. ποΈ--passwdβ this is an alias for the--pskfileoption.
NOTE: THIS OPTION IS DEPRECATED π like, she still works but she's giving vintage, use --pskfile instead.
-v arg,--version=argβ output the version of the program and exit. The default mode isv, a simple version. Thecmode will print copyright information, andnwill print the full copyright notice. β-h,--helpβ display usage information and exit. Your girl always comes through. π-!,--more-helpβ pass the extended usage information through a pager. Fancy. π
π EXAMPLES π
To add a user psk_identity in keys.psk for use with GnuTLS, run:
$ ./psktool -u psk_identity -p keys.psk
Generating a random key for user 'psk_identity'
Key stored to keys.psk
$ cat keys.psk
psk_identity:88f3824b3e5659f52d00e959bacab954b6540344
$
This command will create keys.psk if it does not exist, and will add user psk_identity. Not her making files out of thin air, that's main character energy fr fr. π₯
π EXIT STATUS π
One of the following exit values will be returned:
0(EXIT_SUCCESS) β successful program execution. We love a happy ending. π1(EXIT_FAILURE) β the operation failed, or the command syntax was not valid. π
πΈ SEE ALSO πΈ
gnutls-cli-debug (1), gnutls-serv (1), srptool (1), certtool (1)
The whole friend group, go say hi. π¦
π AUTHORS π
ngl the AUTHORS section is justβ¦ empty in the original. Nothing there. A mystery, a blank canvas, we simply don't know. π
β COPYRIGHT β
Copyright (C) 2020-2023 Free Software Foundation, and others all rights reserved. This program is released under the terms of the GNU General Public License, version 3 or later.
π BUGS π
Please send bug reports to: bugs@gnutls.org
and that's the whole page, bestie β written by the psktool(1) girlies of GnuTLS 3.8.13, dated 29 Apr 2026. periodt. π
β¨
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-utils 3.8.13-1.fc43 Β· GPL-3.0-or-later
- fedora 44: gnutls-utils 3.8.13-1.fc44 Β· GPL-3.0-or-later
- nixpkgs unstable: gnutls 3.8.13
- ubuntu stonking: gnutls-bin 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms