Skip to content
Snippets Groups Projects
Commit 9b568ead authored by root's avatar root
Browse files

add keytab

parent c4a62cc0
No related branches found
No related tags found
No related merge requests found
......@@ -32,11 +32,15 @@ function proxyEnvToggle() {
}
function sshihep() {
kinit -kt ~/keytab zhangxuantong@IHEPKRB5
if [[ -n $1 ]]; then
local SITE=$(printf "%03d" $1)
SITE="lxlogin$SITE.ihep.ac.cn"
ssh -X zhangxuantong@$SITE
else
local SITE=$((1 + RANDOM % 4))
SITE=$(printf "%03d" $1)
SITE="lxlogin$SITE.ihep.ac.cn"
ssh -X zhangxuantong@lxlogin.ihep.ac.cn
fi
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment