39 lines
882 B
Plaintext
39 lines
882 B
Plaintext
|
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
|
||
|
}
|