daily pastebin goal
32%
SHARE
TWEET

Untitled

a guest May 19th, 2017 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. exodist@cgr-gentoo $ cat bin/remagent                                                                              [~]
  2. #!/bin/bash
  3.  
  4. FILE="/tmp/.pid.$@"
  5. if [ -e $FILE ]; then
  6.     pid=`cat $FILE`
  7.     kill -0 $pid &> /dev/null
  8.     if [ $? -eq 0 ]; then
  9.         echo "$0 already running on $@"
  10.         exit 0;
  11.     else
  12.         rm -r "$FILE"
  13.     fi
  14. fi
  15.  
  16. echo "Starting $0"
  17. /usr/bin/ssh -tt "$@" 'if [ -e $SSH_AUTH_SOCK ]; then ln -sf $SSH_AUTH_SOCK /tmp/ssh-agent-$USER-screen; fi; while [ 0 -eq 0 ]; do sleep 1d; done' &>/dev/null &
  18. pid=$!
  19. echo -n $pid > "/tmp/.pid.$@"
  20.  
  21. exodist@cgr-gentoo $ cat bin/s
  22. #!/bin/bash
  23. keychain /home/exodist/.ssh/id_rsa_chad /home/exodist/.ssh/id_rsa
  24. source /home/exodist/.keychain/$HOSTNAME-sh
  25. source /home/exodist/.keychain/$HOSTNAME-sh-gpg
  26.  
  27. urxvt -e /usr/bin/ssh -Y -t $@ screen -RR
  28.  
  29.  
  30. cgr@edev2 $ cat .bashrc                                                                                            [~]
  31. test $SSH_AUTH_SOCK && ln -sf "$SSH_AUTH_SOCK" "/tmp/ssh-agent-$USER-screen"
RAW Paste Data
Top