title: How to log ssh debug info?
body: <p>I need to write the output of ssh debug info into the file. This</p>
  
  <pre><code>ssh -v root@172.16.248.xx &gt; result.txt
  ssh -v root@172.16.248.xx 2&gt;&amp;1 &gt; result.txt
  </code></pre>
  
  <p>doesn't work, the file result.txt is empty, but on the screen i see bunch of debug lines, like:</p>
  
  <pre><code>OpenSSH_5.3p1 Debian-3ubuntu7, OpenSSL 0.9.8k 25 Mar 2009
  debug1: Reading configuration data /etc/ssh/ssh_config
  debug1: Applying options for *
  debug1: Connecting to 172.16.248.xx [172.16.248.xx] port 22.
  debug1: Connection established.
  debug1: permanently_set_uid: 0/0
  etc
  </code></pre>
  
  <p>Is there a way to redirect these lines to the file? </p>