[openssh-commits] [openssh] 01/07: upstream: add a -V flag to print the version, but mostly as a way
git+noreply at mindrot.org
git+noreply at mindrot.org
Sat May 30 23:30:27 AEST 2026
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 7fbe3e440eae0cd2315545ce5abd89e936b3a92f
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Wed May 27 03:04:30 2026 +0000
upstream: add a -V flag to print the version, but mostly as a way
to check the binary is functional; ok deraadt@
OpenBSD-Commit-ID: 0cc5cb22cbfe09ac4c316dd5da0af7a4193a42af
---
ssh-agent.1 | 8 ++++++--
ssh-agent.c | 9 +++++++--
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/ssh-agent.1 b/ssh-agent.1
index 016f7e0eb..ff1653386 100644
--- a/ssh-agent.1
+++ b/ssh-agent.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ssh-agent.1,v 1.86 2025/10/04 21:41:35 naddy Exp $
+.\" $OpenBSD: ssh-agent.1,v 1.87 2026/05/27 03:04:30 djm Exp $
.\"
.\" Author: Tatu Ylonen <ylo at cs.hut.fi>
.\" Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -34,7 +34,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: October 4 2025 $
+.Dd $Mdocdate: May 27 2026 $
.Dt SSH-AGENT 1
.Os
.Sh NAME
@@ -62,6 +62,8 @@
.Fl k
.Nm ssh-agent
.Fl u
+.Nm ssh-agent
+.Fl V
.Sh DESCRIPTION
.Nm
is a program to hold private keys used for public key authentication.
@@ -208,6 +210,8 @@ If a command (and optional arguments) is given,
this is executed as a subprocess of the agent.
The agent exits automatically when the command given on the command
line terminates.
+.It Fl V
+Display the version number and exit.
.El
.Pp
There are three main ways to get an agent set up.
diff --git a/ssh-agent.c b/ssh-agent.c
index b8cecd234..07746193e 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.325 2026/04/28 21:32:05 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.326 2026/05/27 03:04:30 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -80,6 +80,7 @@
#include "ssh-pkcs11.h"
#include "sk-api.h"
#include "myproposal.h"
+#include "version.h"
#ifndef DEFAULT_ALLOWED_PROVIDERS
# define DEFAULT_ALLOWED_PROVIDERS "/usr/lib*/*,/usr/local/lib*/*"
@@ -2268,7 +2269,7 @@ main(int ac, char **av)
__progname = ssh_get_progname(av[0]);
seed_rng();
- while ((ch = getopt(ac, av, "cDdksTuUE:a:O:P:t:")) != -1) {
+ while ((ch = getopt(ac, av, "cDdksTuUVE:a:O:P:t:")) != -1) {
switch (ch) {
case 'E':
fingerprint_hash = ssh_digest_alg_by_name(optarg);
@@ -2334,6 +2335,10 @@ main(int ac, char **av)
case 'U':
U_flag++;
break;
+ case 'V':
+ fprintf(stderr, "%s, %s\n",
+ SSH_VERSION, SSH_OPENSSL_VERSION);
+ exit(0);
default:
usage();
}
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list