title: capture expect ssh output to variable
body: <p>Hey am new to bash scripts and was wondering how would I capture the output of the <code>ssh</code> command into a bash variable? I looked around and cant seem to get it right. I have tried  puts <code>$expect_out(buffer)</code> but when <code>echo</code> it says variable does not exist</p>
  
  <p>I know the response should be just one line and if I want to save that into a variable <code>response</code> and then <code>echo</code> it how would I do that?</p>