File openssh-9.9p1-custom-2.patch of Package openssh
From 01c705ef1d94385e6d84372856f76e6850ed0478 Mon Sep 17 00:00:00 2001
From: Ciprian Dorin Craciun <ciprian@volution.ro>
Date: Tue, 13 Apr 2021 12:45:42 +0300
Subject: [PATCH 2/3] Add `%A` option to various (items that allow expansions)
and which expands to the `HostKeyAlias` (or `HostName`) as configured
---
sshconnect.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sshconnect.h b/sshconnect.h
index 8b0466f29..983a83a06 100644
--- a/sshconnect.h
+++ b/sshconnect.h
@@ -58,21 +58,22 @@ struct ssh_conn_info;
"L", conn_info->shorthost, \
"i", conn_info->uidstr, \
"k", conn_info->keyalias, \
"l", conn_info->thishost, \
"n", conn_info->host_arg, \
"p", conn_info->portstr, \
"d", conn_info->homedir, \
"h", conn_info->remhost, \
"r", conn_info->remuser, \
"u", conn_info->locuser, \
- "j", conn_info->jmphost
+ "j", conn_info->jmphost, \
+ "A", (conn_info->keyalias ? conn_info->keyalias : conn_info->remhost)
int ssh_connect(struct ssh *, const char *, const char *,
struct addrinfo *, struct sockaddr_storage *, u_short,
int, int *, int);
void ssh_kill_proxy_command(void);
void ssh_login(struct ssh *, Sensitive *, const char *,
struct sockaddr *, u_short, struct passwd *, int,
const struct ssh_conn_info *);
--
2.47.1