Browse Source

Add ssh config and update the install script

Pierre-Yves Barriat 7 years ago
parent
commit
d46c93c60f
3 changed files with 92 additions and 0 deletions
  1. 47 0
      bashrc
  2. 36 0
      config
  3. 9 0
      install.sh

+ 47 - 0
bashrc

@@ -1,5 +1,10 @@
 # .bashrc
 
+# Source global definitions
+if [ -f /etc/bashrc ]; then
+	. /etc/bashrc
+fi
+
 configure_ecearth()
 {
   if [ `hostname` != "frontal1" ]; then
@@ -13,6 +18,8 @@ configure_ecearth()
   fi
 }
 
+# User specific aliases and functions
+
 if [ `hostname` = "frontal3" ]; then
   echo "Nothing to load..."
 fi
@@ -20,3 +27,43 @@ if [ `hostname` = "frontal1" ]; then
   [[ -f .configure_ecearth ]] && configure_ecearth
   [[ -f .configure_ecearth ]] && rm .configure_ecearth
 fi
+
+# Path/variables
+# --------------
+export HOST=`uname -n`
+export HISTFILESIZE=6000
+export HISTSIZE=6000
+
+# Display
+# -------
+export PS1="\[\033[1;39m\]\u@\h\[\033[0;0m\] \t \[\033[0;34m\]\w \[\033[2;31m\]\# \[\033[0;0m\]> "
+
+# alias
+# -----
+if [ `uname` = "Linux" ] ; then
+ alias df='df -hT'
+ alias ls='ls --color -F'
+ alias lo='ls -oh -F'
+ alias cpa="cp -a"
+ alias ps="ps --forest"
+else
+ alias df='df -k'
+ alias ls='ls -F'
+ alias lo='ls -o -F'
+ alias cpa="cp -rf"
+fi
+
+alias rm="rm -i"
+alias mv="mv -i"
+alias cp="cp -i"
+
+alias cd..="cd .."
+alias dc="cd"
+
+alias la='ls -a -o -F -l'
+alias sl='ls'
+alias l='ls -lh'
+alias ll='ls -o -F'
+alias lt='ls -l -s -t |more'
+alias m="less"
+alias h="history"

+ 36 - 0
config

@@ -0,0 +1,36 @@
+Host *
+    ForwardAgent yes 
+    ForwardX11 yes 
+    IdentitiesOnly yes 
+    StrictHostKeyChecking no
+Host gwelic
+    User pbarriat
+    Hostname www.climate.be
+    IdentityFile ~/.ssh/id_rsa
+Host *%gwelic
+    ProxyCommand ssh -q -W %h:%p gwelic
+Host gwcism
+    User pbarriat
+    Hostname gwcism.cism.ucl.ac.be
+Host *%gwcism
+    ProxyCommand ssh -W %h:%p gwcism
+Host gwceci
+    User pbarriat
+    Hostname gwceci.cism.ucl.ac.be
+    IdentityFile ~/.ssh/id_rsa.ceci
+Host *%gwceci
+    ProxyCommand ssh -W %h:%p gwceci
+
+####################################
+
+Host elixir*
+    HostName elixir.elic.ucl.ac.be
+    User pbarriat
+Host elixir%gwcism
+Host elixir%gwelic
+
+Host egit
+    User git 
+    Hostname www.climate.be
+    Port 3022
+    Proxycommand ssh -xaqW %h:%p gwcism

+ 9 - 0
install.sh

@@ -3,6 +3,15 @@
 TAG="3.2.2"
 TARGET="$HOME/modeles/ecearth_$TAG"
 
+mv $HOME/.bashrc $HOME/bashrc_old
+cp bashrc $HOME/.bashrc
+
+mv $HOME/.ssh/config $HOME/.ssh/config_old
+cat config | sed -e 's/pbarriat/'$USER'/g' > $HOME/.ssh/config
+
+#[ ! -f ~/.ssh/id_rsa.pub ] && ssh-keygen -t rsa
+#ssh-copy-id -i ~/.ssh/id_rsa.pub gwcism
+
 cp $TAG/sources/config-build.xml $TARGET/sources/config-build.xml
 cp $TAG/runtime/classic/config-run.xml $TARGET/runtime/classic/config-run.xml
 cp $TAG/runtime/classic/ece-ifs+nemo.sh.tmpl $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl