title: What is the best way to open remote files with emacs and ssh
body: <p>I connect to the remote machine with <code>ssh user@192.168.1.5</code>. When I need to open a file in the remote machine I do, e.g.,</p>
  
  <p><code>emacs /usr/share/nginx/html/index.html</code></p>
  
  <p>and that opens the <code>index.html</code> file in the shell. I noticed that some emacs commands work but others do not work. For instance, <code>C-w</code> does not work; <code>M-&lt;</code> does not work. How can I fix this, and what is the best way to work with emacs and ssh?</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/1346688/ssh-through-emacs-shell">this question</a> but it made me more confused. </p>