title: How do I write a script to ssh to a computer from a remote computer?
body: <p>I frequently need to ssh into a server, but I can't ssh into it directly while I'm connected to our VPN.  Thus, I have to ssh into <em>another</em> server and ssh into it from there.  Is there any way that I can write a script and/or shell function for this?  I've tried this, buit it gave me an error:</p>
  
  <pre><code>% ssh jason@server2 'ssh jason@server1'
  jason@server2's password: 
  Pseudo-terminal will not be allocated because stdin is not a terminal.
  Permission denied, please try again.
  Permission denied, please try again.
  Permission denied (publickey,gssapi-with-mic,password).
  </code></pre>
  
  <p>(and of course the username and server name have been changed)</p>