title: jenkins shell throws inappropriate ioctl for device
body: <p>I'm trying to deploy ruby from jenkins shell with command "cap production deploy", but it throws an error:</p>
  
  <blockquote>
    <p>deploy@10.105.27.132's password:(Backtrace restricted to imported tasks)
    cap aborted!
    SSHKit::Runner::ExecuteError: Exception while executing as deploy@10.105.27.132: Inappropriate ioctl for device
    Errno::ENOTTY: Inappropriate ioctl for device</p>
  </blockquote>
  
  <p>If I perform the command manually from the terminal it executes without problem.
  I have set up public keys so that I can execute the command without any need to enter password and also added deploy keys to project in GitLab.</p>
  
  <p>As I searched for an answer I saw that in most cases the problem is with the deploy keys, but I have added it to the project and I can execute the command manually from the terminal, so the problem must be in Jenkins shell.
  It seems that it probably uses some interpretation of the terminal and not the real thing.</p>
  
  <p>Is there a way I can fix this, so I can execute the command from Jenkins shell?</p>