title: How to use paramiko.ServerInterface to response exec request
body: <p>An OpenSSH server on Ubuntu, for example, can response to <code>ssh [username@]hostname [command]</code>, do this single [command] and response.</p>
  
  <p>For example, </p>
  
  <pre><code>me@ubuntu:~$ ssh 127.0.0.1 ls
  Desktop Documents Downloads Music Pictures Public Videos
  me@ubuntu:~$
  </code></pre>
  
  <p>Question is:</p>
  
  <ul>
  <li>How to achieve this kind of server with <a href="http://paramiko-docs.readthedocs.io/en/latest/api/server.html" rel="nofollow noreferrer">paramiko.ServerInstance</a>?</li>
  <li>How to control the input and output to local shell's stdin and stdout?</li>
  </ul>
  
  <p>One more question is, what if the background command handler is not an standard shell, but a implementation by something like <a href="https://github.com/simon-engledew/sshim" rel="nofollow noreferrer">sshim</a>?</p>