changes ssh wrap

This commit is contained in:
Simonas Narbutas
2018-07-11 10:37:39 +02:00
parent 01e2cf8f41
commit 34b83149df
4 changed files with 17 additions and 15 deletions

2
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule ".zsh-git-prompt"]
path = .zsh-git-prompt
url = http://localhost:8081/simas/dotfiles.git
url = https://github.com/olivierverdier/zsh-git-prompt.git

Submodule .zsh-git-prompt deleted from 0a6c8b610e

16
.zsh.d/20-functions.zsh Normal file
View File

@@ -0,0 +1,16 @@
OS_TYPE=$(uname -s)
if [ "$OS_TYPE" = "Darwin" ]; then
PWDID=6731738634759616518
BID=snarbutas@BOLCOM.NET
function ssh() {
if ! kswitch -p "$BID"; then
lpass show --password "$PWDID" | kinit --password-file=STDIN "$BID"
elif klist -l | grep "*"|grep Expired; then
lpass show --password "$PWDID" | kinit --password-file=STDIN "$BID"
fi
eval TERM=screen `/usr/bin/which ssh` $*
}
fi
decrypt () {
ssh -qtt shd-puppet-server-001.bolcom.net "sudo /opt/puppetlabs/bin/puppetserver ruby /var/lib/puppetserver/jruby-gems/gems/hiera-eyaml-2.1.0/bin/eyaml decrypt -s "${1}" 2>/dev/null"
}

View File

@@ -1,13 +0,0 @@
PWDID=6731738634759616518
BID=snarbutas@BOLCOM.NET
function ssh() {
if ! kswitch -p "$BID"; then
lpass show --password "$PWDID" | kinit --password-file=STDIN "$BID"
elif klist -l | grep "*"|grep Expired; then
lpass show --password "$PWDID" | kinit --password-file=STDIN "$BID"
fi
eval TERM=screen `/usr/bin/which ssh` $*
}
decrypt () {
ssh -qtt shd-puppet-server-001.bolcom.net "sudo /opt/puppetlabs/bin/puppetserver ruby /var/lib/puppetserver/jruby-gems/gems/hiera-eyaml-2.1.0/bin/eyaml decrypt -s "${1}" 2>/dev/null"
}