I have a computer with two HD's. One of them runs linuxmint. The other one has a Windows 10 installed.

I'm able to mount the windows disk and visualize all files within linux, but I actually needed to perform system actions via ssh on windows. Is there a way to boot the windows in my machine (like inside virtualbox) so I can ssh into it from my linux?

I've though of mounting the windows partition as a disk image and then use it as a virtual hard disk for a virtualbox machine, but I don't know if this is possible.

(Also, I don't really know which tags are the best for this question, if someone knows, please tell me)

  • It is not possible to SSH into any OS if the OS is not running. So in the case you describe, you cannot SSH from Linux into the offline Windows installation. – Ramhound Dec 10 '19 at 17:17
  • Well, I believe that's the reason I added that third paragraph in my question. Since I'm able to mount the partition, is a reasonable thought that I could mount it as a disk image, and therefore, load it into VirtualBox. – Teodoro Mendes Dec 10 '19 at 17:22
  • 1
    Mounting just the Windows partition would not result in a Virtual Machine that could boot to that Windows installation. – Ramhound Dec 10 '19 at 17:26
  • @Ramhound Yes. Virtual Machine will not directly boot from the original Windows disk. So Teodoro Mendes will need one more windows installation as guest OS. – JPI Dec 10 '19 at 17:36
  • There's definitely way to boot a raw disk with virtualbox or even better qemu/kvm. It's just that Windows is silly that doing so could make the installation no longer bootable on the physical machine. (Something to do with boot time driver loading; with certain choices of drive emulation it could be avoided) – Tom Yan Dec 10 '19 at 23:01

Is there a way to boot the windows in my machine (like inside VirtualBox) so I can ssh into it from my Linux?

  • On your Linux OS, you will have to use VirtualBox or similar tool and create new virtual HDD and install Windows on it (let's call it as GUEST Windows OS).
  • Then you will be able to use your existing Windows disk mounted (let's call it as MOUNTED DISK) in this guest Windows OS as an additional drive.
  • Now you will need Bitwise SSH-Server (I don't know other freeware software for this purpose) installed on your guest Windows OS. Then create a user in SSH-Server to login and set with permissions to access the mounted disk.
  • At last, from your Linux OS environment, you shall be able to access this guest Windows through SSH client and access files on your mounted disk.

However, be careful that any changes of files on windows drive through Linux OS might cause line ending format issues. Also any programs or servies files of the mounted disk will not be running automatically on guest Windows OS (because it is just additional disk) so your Linux OS to guest Windows OS ssh may not serve purpose (if desired to execute program/service on the original windows disk).

  • Third-party software is not required. Windows 10 has an optional built-in OpenSSH Server and OpenSSH Client that can be installed. – Ramhound Dec 10 '19 at 17:45
  • @Ramhound Not sure why Microsoft still has OpenSSH in the Add/Remove features, but that version should not be utilized as it's ancient, has never been updated (IIRC it's something like version 0.98.x... current version is, and is no longer supported (hasn't been for at least 18 months, likely much longer). Grab Win32-OpenSSH directly from Microsoft's GitHub – JW0914 Dec 10 '19 at 17:56
  • Ok, so, forgetting about ssh for now, programs will not run automatically on guest Windows, but they will if I try to? I mean, if I run the guest Windows in virtualbox, and my original drive as this "additional drive", will I be able to run something from the original drive within the guest? (something graphical, maybe like a game or so) – Teodoro Mendes Dec 10 '19 at 17:56
  • @Ramhound Microsoft only has it within Add Features in Settings > Apps & Features > Optional Features > Add Feature and AFAIK, it's never been available via Turn Windows Features on/off via Control Panel\All Control Panel Items\Programs and Features || optionalfeatures. Why it's still listed in Add Features is mystifying and must simply be an oversight from when OpenSSH was originally ported over to Windows, but that version is years behind the Win32-OpenSSH project on Microsoft's Powershell GitHub account. – JW0914 Dec 10 '19 at 18:03
  • @JW0914 - I confused myself. I remember investigating OpenSSH but that was months ago. I forgot which add/remove windows feature list it was contained within. Disregard my previous comment. – Ramhound Dec 10 '19 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.