title: using ssh keys in bash script
body: <p>I've setup ssh keys form server A to server B and I can login to server B without a password. I'm trying to setup a reverse ssh tunnel in a bash script. From the command line if I do</p>
  
  <pre><code>ssh -N -R 1234:localhost:22 user@mydomain.co.uk -p 22
  </code></pre>
  
  <p>form server A it works as expected i.e no password required, however if I use it in a script</p>
  
  <pre><code>#!/bin/bash
  /usr/bin/ssh -N -R 1234:localhost:22 user@mydomain.co.uk -p 22
  </code></pre>
  
  <p>I get asked for the password</p>
  
  <pre><code>user@mydomain.co.uk's password:
  </code></pre>
  
  <p>How do I make it so it uses the keys?</p>