install_ceci.sh 466 B

1234567891011121314151617
  1. #!/bin/bash
  2. TARGET=lorenz
  3. cd $HOME
  4. touch $HOME/.Xauthority
  5. [ ! -s $HOME/.ssh/id_rsa.ceci ] && exit
  6. chmod 600 $HOME/.ssh/id_rsa.ceci
  7. [ -s $HOME/.ssh/config ] && mv $HOME/.ssh/config $HOME/.ssh/config_old
  8. [ ! -f $HOME/.ssh/id_rsa.pub ] && cat /dev/zero | ssh-keygen -q -N "" > /dev/null
  9. cat ceci_config | sed -e 's/jsmith/'$USER'/g' > $HOME/.ssh/config
  10. ssh-copy-id -i $HOME/.ssh/id_rsa gwcism #2> /dev/null
  11. ssh-copy-id -i $HOME/.ssh/id_rsa $TARGET #2> /dev/null