title: SSH while-loop in bash. Pseudo-terminal will not be allocated because stdin is not a terminal
body: <p>I am trying to loop a file to ssh to a list of servers, and perform a find command on those servers for certain logfiles. I know that ssh will swallow the input file as a whole. So i am using the -n parameter to ssh. This works fine but oncertain servers i encounter a new error.</p>
  
  <p>The input file is build like:
  servername:location:mtime:logfileexention</p>
  
  <p>The code in Bash I use is:</p>
  
  <pre><code>sshCmd="ssh -n -o ConnectTimeout=5 -o Batchmode=yes -o StrictHostKeyChecking=no -o CheckHostIP=no -o PasswordAuthentication=no -q"
  
  while IFS=: read -r f1 f2 f3 f4 ; do        
  $sshCmd "$f1"
  find "$f2" -type f -name "$f4" -mtime +"$f3"
  </code></pre>
  
  <p>On certain servers i receive the following error:</p>
  
  <p><strong>Pseudo-terminal will not be allocated because stdin is not a terminal.
  stty: standard input: Inappropriate ioctl for device</strong></p>
  
  <p>I have tried multiple options to resolve this. I have used the -t, -tt, -T options but when using these either the same error persists or the terminal becomes unresponsive.</p>
  
  <p>Anyone has a solution for this?</p>