Mercurial > index.cgi > dotfiles
comparison .bash_aliases @ 167:88ed01a1094f
SSH Certificate signing
author | Steve Huston <huston@astro.princeton.edu> |
---|---|
date | Thu, 25 Oct 2018 11:06:32 -0400 |
parents | ab0fb2057b88 |
children | 9fed6f4301db |
comparison
equal
deleted
inserted
replaced
166:d7cd94900d0e | 167:88ed01a1094f |
---|---|
68 fi | 68 fi |
69 ssh -t $T_HOST "ssh $1" | 69 ssh -t $T_HOST "ssh $1" |
70 } | 70 } |
71 alias x='ssh xanadu.astro.princeton.edu' | 71 alias x='ssh xanadu.astro.princeton.edu' |
72 | 72 |
73 # SSH key signing with Vault for administration | |
74 cert() { | |
75 export VAULT_ADDR='https://ajax.rc.princeton.edu:8200' | |
76 ssh-add -d $HOME/.ssh/picscie.pvt-cert.pub > /dev/null 2>&1 | |
77 if vault login -method=radius username=vi-srh; then | |
78 vault write -field=signed_key ssh-client-signer/sign/root public_key=@$HOME/.ssh/picscie.pub > $HOME/.ssh/picscie.pvt-cert.pub | |
79 ssh-add $HOME/.ssh/picscie.pvt | |
80 else | |
81 echo Failed to login to vault, aborting | |
82 fi | |
83 } | |
84 | |
73 # Proxying/tunneling - predominantly for my Mac laptop | 85 # Proxying/tunneling - predominantly for my Mac laptop |
74 proxy() { | 86 proxy() { |
75 PROXY_HOST=csesbh.princeton.edu | 87 PROXY_HOST=csesbh.princeton.edu |
76 PROXY_PORT=8888 | 88 PROXY_PORT=8888 |
77 ssh -D $PROXY_PORT -f -C -q $PROXY_HOST 'sleep 15' | 89 ssh -D $PROXY_PORT -f -C -q $PROXY_HOST 'sleep 15' |