title: cygwin/sshd and Virtualbox
body: <p>I'm using vagrant/VirtualBox on my Window (8.1) Laptop to start up a linux-test-vm from a Cygwin terminal... <code>vagrant up</code>, <code>vagrant ssh</code>, everything is working fine.</p>
  
  <p>Now I want to work on that environment remotely from my main Linux-Workstation, so I've set up <code>sshd</code> in Cygwin and I can successfully ssh into my Windows-Box (same user as logged in locally in windows).</p>
  
  <p>But when I <code>cd</code>'ed (via my remote ssh connection to windows-laptop) in my working directory and ran <code>vagrant ssh</code>, it tells me:</p>
  
  <p><code>VM must be created before running this command. Run 'vagrant up' first</code></p>
  
  <p>But I see the VM is running in VirtualBox GUI on Windows.</p>
  
  <p>From this point on even locally on the Windows machine I can no longer interact with the running vagrant vm and the <code>.vagrant</code> (sub)directory has not files inside.</p>
  
  <hr>
  
  <p>Same happens vice versa:</p>
  
  <ul>
  <li>I stopped/deleted the VM in VirtualBox GUI</li>
  <li>ran <code>vagrant up</code> via my ssh connection ... worked</li>
  <li>ran <code>vagrant ssh</code> via my ssh connection ... works</li>
  <li>but I do not see the VM in VirtualBox GUI on Windows</li>
  <li>trying <code>vagrant ssh</code> locally on Windows ... same error again and <code>.vagrant</code> directory gets cleared</li>
  </ul>
  
  <hr>
  
  <p>So I assume the Cygwin/sshd connection creates some sort of different Sessions that do not share the same "instance" of VirtualBox.</p>
  
  <p>Is there any chance to share VirtualBox/vagrant environment between the local Windows and remote ssh session ???</p>
  
  <p><strong>WORKAROUND:</strong></p>
  
  <ul>
  <li>export ssh-config on the windows host: <code>vagrant ssh-config &gt; ssh_config</code></li>
  <li>from the cygwin/ssh jump into the VM: <code>ssh -F ssh_config default</code></li>
  <li><strong>never</strong> run any <code>vagrant</code> command from the cygwin/ssh connection</li>
  </ul>