=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/readconf.c,v retrieving revision 1.332 retrieving revision 1.333 diff -u -r1.332 -r1.333 --- src/usr.bin/ssh/readconf.c 2020/07/05 23:59:45 1.332 +++ src/usr.bin/ssh/readconf.c 2020/07/17 07:09:24 1.333 @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.332 2020/07/05 23:59:45 djm Exp $ */ +/* $OpenBSD: readconf.c,v 1.333 2020/07/17 07:09:24 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -650,7 +650,7 @@ if (r == (negate ? 1 : 0)) this_result = result = 0; } else if (strcasecmp(attrib, "exec") == 0) { - char *conn_hash_hex; + char *conn_hash_hex, *keyalias; if (gethostname(thishost, sizeof(thishost)) == -1) fatal("gethostname: %s", strerror(errno)); @@ -661,12 +661,15 @@ (unsigned long long)pw->pw_uid); conn_hash_hex = ssh_connection_hash(thishost, host, portstr, ruser); + keyalias = options->host_key_alias ? + options->host_key_alias : host; cmd = percent_expand(arg, "C", conn_hash_hex, "L", shorthost, "d", pw->pw_dir, "h", host, + "k", keyalias, "l", thishost, "n", original_host, "p", portstr,