qusal/salt/sys-ssh-agent/files/server/rpc/qusal.SshAgent

15 lines
335 B
Plaintext
Raw Normal View History

2023-11-13 09:33:28 -05:00
#!/bin/sh
# SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
set -eu
#origin="$QREXEC_REMOTE_DOMAIN"
agent="$QREXEC_SERVICE_ARGUMENT"
socket="/tmp/qubes-ssh-agent/${agent}.sock"
qvm-ssh-agent add "${agent}" >/dev/null
exec socat STDIO UNIX-CLIENT:"$socket"