title: Keeping Alive a ssh session with a script bash/expect
body: <p>Hello People i'm trying to do an script bash using a expect part to enter a server and keep alive the session, my script is as follow: </p>
  
  <pre><code>#!/bin/bash
  /usr/bin/expect &lt;&lt; eof
  spawn ssh user@server
  set prompt ":|#|\\\$"
  expect "password"
  interact
  eof
  </code></pre>
  
  <p>I can enter to the server but the session dies after a second and return to my local computer, </p>
  
  <p>Can any one help me please?</p>