title: Connect SSH command to stdout
body: <p>I am creating a command-line tool that dynamically finds a server from our cluster, then based on the cluster retrieves the appropriate private key held in an Amazon s3 bucket and copies it to a tempfile locally to connect to the server.</p>
  
  <p>How would I SSH into an IP address and then allow the user to interact with the SSH session?</p>
  
  <p>This example would open a ssh session to a machine in the cluster named "platform":</p>
  
  <pre><code>company_name ssh:platform
  </code></pre>
  
  <p>I've done this before in Ruby like so:</p>
  
  <pre><code>exec("ssh -i #{private_key_file.path} -R 52698:localhost:52698 core@#{platform_ip}")
  </code></pre>