openssh supports environment variable expansion in its ssh_config file[1]. These two environment variables can be used to expand paths for ssh sockets and other files. Ex. ``` Host * ControlMaster auto ControlPath ${XDG_RUNTIME_DIR}/ssh-%C.ctl IdentityAgent ${XDG_RUNTIME_DIR}/ssh-agent.socket ``` see also: [1] https://man7.org/linux/man-pages/man5/ssh_config.5.html#ENVIRONMENT_VARIABLES [2] https://gitlab.com/libvirt/libvirt/-/issues/232 Signed-off-by: Дамјан Георгиевски <gdamjan@xxxxxxxxx> --- src/rpc/virnetsocket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c index 943406cd64..76d8519d3a 100644 --- a/src/rpc/virnetsocket.c +++ b/src/rpc/virnetsocket.c @@ -852,6 +852,8 @@ int virNetSocketNewConnectSSH(const char *nodename, cmd = virCommandNew(binary ? binary : "ssh"); virCommandAddEnvPassCommon(cmd); + virCommandAddEnvPass(cmd, "HOME"); + virCommandAddEnvPass(cmd, "XDG_RUNTIME_DIR"); virCommandAddEnvPass(cmd, "KRB5CCNAME"); virCommandAddEnvPass(cmd, "SSH_AUTH_SOCK"); virCommandAddEnvPass(cmd, "SSH_ASKPASS"); -- 2.33.1