how to forward envars through ssh ...
13 02 2023
puffy$ export myvar="SuperSecret"
puffy$ ssh localhost
Last login: Mon Feb 13 15:53:47 2023 from 127.0.0.1
OpenBSD 7.2 (GENERIC.MP) #6: Sat Jan 21 01:03:04 MST 2023
Welcome to OpenBSD: The proactively secure Unix-like operating system.
puffy$ env |grep myvar
puffy$
# PRESENTING CODE
# /etc/ssh/sshd_config
...
Match Address localhost
AcceptEnv myvar
AllowAgentForwarding yes
# /etc/ssh/ssh_config
Host localhost
ForwardAgent yes
SendEnv myvar
...
# restart sshd
doas rcctl restart sshd
# PRESENTING CODE
puffy$ export myvar="TopSecret1234"
puffy$ env |grep myvar
myvar=TopSecret1234
puffy$ ssh localhost
Last login: Mon Feb 13 19:36:07 2023 from 127.0.0.1
OpenBSD 7.2 (GENERIC.MP) #6: Sat Jan 21 01:03:04 MST 2023
Welcome to OpenBSD: The proactively secure Unix-like operating system.
puffy$ env |grep myvar
myvar=TopSecret1234
# PRESENTING CODE
or check my blog ...
https://blog.stoege.net
twitter: @stoege
mastodon: @[email protected]