美文网首页
Windows执行Liunx命令

Windows执行Liunx命令

作者: peteLee | 来源:发表于2019-03-15 16:41 被阅读0次

使用软件cygwin + openssh

下载

cygwin http://www.cygwin.com/

安装

  • 双击setup-x86_64.exe


    image.png
  • 安装openssh


    image.png
  • 配置
    运行cygwin,输入ssh-host-config
    接下来会有一系列选项, 除以下需要注意外,其他一律选择no。

    1. Should privilege separation be used?(yes/no)no;
      Do you want to install sshd as service? (yes/no) yes;
      Enter the value of cygwin for the daemon:ntsec;
      Create new privileged user account "**\cyg_server"(cygwin name:'cyg_server')?(yes/no)yes;然后就是输入密码。
    2. 以上配置完后,输入 cygrunsrv --start sshd启动ssh服务,如果需要停止则输入 cygrunsrv --stop sshd
    3. 如果需要使用windows平台的账号密码进行认证登陆,在cygwin平台窗口下再运行如下两条命令: mkpasswd -l > /etc/passwd 和 mkgroup -l > /etc/group
  • 测试
    用其它电脑执行 ssh windows账户名@IP ,密码为windows登录密码

相关文章

网友评论

      本文标题:Windows执行Liunx命令

      本文链接:https://www.haomeiwen.com/subject/uphrmqtx.html