Use SSH to connect to a Windows OS in Linux

28,746

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/

Share:
28,746

Related videos on Youtube

orange
Author by

orange

Updated on September 18, 2022

Comments

  • orange
    orange almost 2 years

    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 [email protected]
    
                            ****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.
    
    
    [email protected]'s password: 
    Permission denied, please try again.
    [email protected]'s password: 
    Permission denied, please try again.
    [email protected]'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.

    • user
      user over 10 years
      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?
    • Panther
      Panther over 10 years
      Are trying to connect to a windows server or is windows the client and Linux the server ?
    • orange
      orange over 10 years
      I want to connect from a Linux host to a Windows host..
    • Panther
      Panther over 10 years
      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.
    • orange
      orange over 10 years
      yes..I am installing a Windows ssh server --openssh...
    • Panther
      Panther over 10 years
      Is "sikaiwei" your user name on the Windows server ? What password are you using (use your windows login password I assume).
    • orange
      orange over 10 years
      oh,no!"sikaiwei" is not."myth" is my user name on the Windows server.But I try it again,the error still exist..
    • derobert
      derobert over 10 years
      This question appears to be off-topic because it is about configuring a SSH daemon on Windows.
    • orange
      orange over 10 years
      sorry.But I don't know where I can go except this site...
    • user
      user over 10 years
      You could try Super User or very possibly Server Fault (though I think Super User would be a better bet). You can flag your question for moderator attention if you want it migrated; please don't simply repost it elsewhere.
    • orange
      orange over 10 years
      Sorry.How can I do to flag my question for moderator attention and migrate it to Super User?