3

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.

closed as unclear what you're asking by a CVn, Anthon, slm, jasonwryan, derobert Dec 11 '13 at 18:30

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Do you want to connect from a Linux host to a Windows host (it's Windows, not window), or do you want to connect from a Windows host to a Linux host? – a CVn Dec 11 '13 at 16:17
  • Are trying to connect to a windows server or is windows the client and Linux the server ? – Panther Dec 11 '13 at 16:17
  • I want to connect from a Linux host to a Windows host.. – orange Dec 11 '13 at 16:32
  • The machine you connect FROM is the client, the machine you connect TO is the server. Sounds as if you need a Windows ssh server. – Panther Dec 11 '13 at 16:36
  • yes..I am installing a Windows ssh server --openssh... – orange Dec 11 '13 at 17:04
4

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/

0

Windows machine should run some SSH server, for example I like this one: freeSSHD (http://www.freesshd.com/), which suit my needs. Just you have to respect Windows style folders, etc. Simple: You will get into a DOS prompt. Other functions of freeSSHd will enable you to connect there by SFTP, mount Windows files and folders s a local drive via sshfs, manage allowed users, manage access keys (if necessary), and you can simply choose to run freeSSHd as a service, so the Windows machine has not to be logged in.

Update on the edit

Do you have allowed some AllowUsers or AllowGroups in the config? Do you log by your Linux root or you use windows user/password? Do not forget, you are running this software in hostile Windows environment. This user should be allowed to run certain things in Windows, therefore try it with an admin account first.

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