Ssh – Use SSH to connect to a Windows OS in Linux

linuxsshwindow

In Windows machine, I installed Ubuntu in my Oracle VM VirtualBox.

In Ubuntu, if I want to connect to another Linux machine:

$ ssh username@ip

But if I want to connect to my Windows machine, that way doesn't work!

So how can I connect to a Windows machine using ssh from Ubuntu (i.e. in my vm virtualBox)?

@bodhi.zazen thank your answer. After I install openssh for Windows, when I use ssh username@ip, there is the following error:

root@lime-VirtualBox:/home/lime# ssh sikaiwei@192.168.1.103

                        ****USAGE WARNING****

This is a private computer system. This computer system, including all
related equipment, networks, and network devices (specifically including
Internet access) are provided only for authorized use. This computer system
may be monitored for all lawful purposes, including to ensure that its use
is authorized, for management of the system, to facilitate protection against
unauthorized access, and to verify security procedures, survivability, and
operational security. Monitoring includes active attacks by authorized entities
to test or verify the security of this system. During monitoring, information
may be examined, recorded, copied and used for authorized purposes. All
information, including personal information, placed or sent over this system
may be monitored.

Use of this computer system, authorized or unauthorized, constitutes consent
to monitoring of this system. Unauthorized use may subject you to criminal
prosecution. Evidence of unauthorized use collected during monitoring may be
used for administrative, criminal, or other adverse action. Use of this system
constitutes consent to monitoring for these purposes.


sikaiwei@192.168.1.103's password: 
Permission denied, please try again.
sikaiwei@192.168.1.103's password: 
Permission denied, please try again.
sikaiwei@192.168.1.103's password: 
Permission denied (publickey,password,keyboard-interactive).

And in my Windows machine, I reedit the C:\Program Files (x86)\OpenSSH for Window/etc/sshd_config like that:

PermitRootLogin yes
PasswordAuthentication yes

But I still get the same error.

When I connect my Ubuntu using ssh from my Windows machine, the error

Permission denied (publickey,password,keyboard-interactive)

still exists.

Best Answer

Same way, but you need to run a ssh server on the Windows machine (and make sure you are not firewalling the connection).

See - https://stackoverflow.com/questions/18292/what-are-some-good-ssh-servers-for-windows

Edit: If you need a windows ssh client, use PuTTy

http://www.chiark.greenend.org.uk/~sgtatham/putty/

Related Question