zoukankan      html  css  js  c++  java
  • 如何使用Cygwin在Windows上运行OpenSSH SSHD服务器

    记录几款非常有趣, 但不怎么耳熟的软件:

     

     

    Cygwin 是可以安装 OpenSSH server 和 client 的, Mosh 也可以, 这对于 Linux 用户而言就非常方便了.

    如何使用Cygwin在Windows上运行OpenSSH SSHD服务器

    http://www.noah.org/ssh/cygwin-sshd.html

    Install the following Cygwin packages (rerun setup if necessary -- you can add packages after you have already installed Cygwin).

    Admin --> cygrunsrv
    Net --> openssh

    Open a new bash shell window and run the SSH configure stuff.

    ssh-host-config -y

    This step will create necessary configuration files, a priviledge separation user and necessary directories.

    When prompted with "CYGWIN=" type for following:

    tty ntsec

    Now you are ready to start the service.

    cygrunsrv -S sshd

    Finished

    Bugs

    Sometimes you get a sshd/cygrunsrv service error after trying to run the service.

    cygrunsrv: Error starting a service:
    QueryServiceStatus: Win32 error 1062:
    The service has not been started.

    There can be a couple of causes for this. The following may fix the problem (this is not an option on XP Home).

    Solution 1.

    You may have an old or corrupt installation of Cygwin. Try reinstalling. The following may also help:

    cygrunsrv -R sshd
    REBOOT (or use the Task Manager to kill all instances of sshd that may be running in the background)
    run "ssh-host-config -y" again.
    This seemed to help on a few systems I worked on.

    Solution 2.

    Open an explorer window and use the "Properties | Security" dialog and explicitly add "Full Control" for the SYSTEM user to the following directories:

    C:Cygwin
    C:Cygwinvar
    C:Cygwinvarlog

    Hope that helps!

    OpenSSH server 安装后是一个叫 CYGWIN sshd 的服务, 如果启动失败, 需要更改为本地登录.

  • 相关阅读:
    POJ 2112 Optimal Milking (Dinic + 二分)
    [1444] The Waterfall Flow
    [1443] Weiqi
    POJ 3750 小孩报数问题 (约瑟夫问题)
    POJ 1386 Play on Words
    支持Delphi2009/2010的DES加密单元
    升级Delphi2010时text字段问题
    JS的encodeURI编码后,PHP解码方法
    Indy发送邮件被kbas退掉
    关于Delphi2010使用Indy发送邮件乱码问题的解决
  • 原文地址:https://www.cnblogs.com/develon/p/9977882.html
Copyright © 2011-2022 走看看