title: Initial Welcome Message(Banner) after SSH not letting commands to get executed properly
body: <p>I am trying to <code>SSH</code> to a server and the execute some commands on destination server.</p>
  
  <p>Below is my code</p>
  
  <pre><code>!/bin/ksh
  
  ssh user@pass &lt;&lt;EOF
  how to wait ?
  
  DIR_INPUT=/home/
  
  LOGS=
  echo "Enter Deployment Date (YYYYMMDD e.g 20150631)"
  read DDATE
  DDATE=`echo $DDATE | sed s/[^0-9]*//g`
  echo "$DDATE"
  MGT=`echo "$DDATE" | cut -c5-6 2&gt;/dev/null`
  DGT=`echo "$DDATE" | cut -c7-8 2&gt;/dev/null`
  LEQ=`echo ${#DDATE}`
  
  echo $MGT
  echo $DGT
  echo $LEQ
  
  if [ "$MGT" -gt 12 ] || [ "$DGT" -gt 31 ] || [ "$LEQ" -gt 8 ] || [ "$LEQ" -lt 8 ] || [ "$MGT" -eq 0 ] || [ "$DGT" -eq 0 ]
  then
                  echo "INVAILID DATE"
                  exit 1
  fi
  echo "$DDATE"
  cd $DIR_INPUT
  EOF
  </code></pre>
  
  <p>After <code>SSH</code> to server there are some predefined text that echoes on server and because of that,the commands associated with <code>SSH</code> executes before the terminal of other server comes.</p>
  
  <p>Is there any way to put command which will wait for sometime until the ssh connection is not fully made?</p>