zshlibs/zssh/zssh_node_info

39 lines
882 B
Plaintext
Raw Normal View History

2024-01-18 12:18:03 +00:00
function zssh_node_info()
{
local ssh_node=$1
shift
while getopts 'kKcCM:E:' opt
do
case $opt in
(s)
# private privkey
echo "$zssh_private_keys/${ssh_node}.key"
;;
(k)
# private pubkey
echo "$zssh_private_keys/${ssh_node}.key.pub"
;;
(M)
# public pubkey mail file
echo "$zssh_global_pubkeys/${ssh_node}/${OPTARG}.key.pub"
;;
(K)
# public pubkey bucket
echo "$zssh_global_pubkeys/${ssh_node}"
;;
(c)
# private ssh hostconfig
echo "$zssh_private_configs/${ssh_node}.sshconf"
;;
(C)
# public config bucket
echo "$zssh_global_configs/${ssh_node}"
;;
(E)
# public config bucket piece
echo "$zssh_global_configs/${ssh_node}/${OPTARG}.sshconf"
;;
esac
done
}