zshlibs/zssh/zssh_generate_hostaccessconfig

17 lines
401 B
Plaintext
Raw Permalink Normal View History

2024-01-18 12:18:03 +00:00
function zssh_generate_hostaccessconfig()
{
sshmatch="${1}"
sshcontents=${zssh_host_config_accesses[$sshmatch]}
sshmatch_user=${sshmatch%%@*}
sshmatch_host=${sshmatch##*@}
if [[ "$sshmatch_host" == "$sshmatch_user" ]]
then
sshmatch_user=''
fi
<< HERE
Match ${sshmatch_host:+host $sshmatch_host,} ${sshmatch_user:+user $sshmatch_user,}
${sshcontents}
${zssh_host_config}
HERE
}