Cygwin介绍:

Cygwin是一个在windows平台上执行的类UNIX模拟环境。它对于学习UNIX/Linux操作环境,或者从UNIX到Windows的应用程序移植,或者进行某些特殊的开发工作,尤其是使用GNU工具集在Windows上进行嵌入式系统开发,很实用。

由于要学习hadoop分布式文件系统,想在window下模拟linux环境进行部署。

所以想到用cygwin工具。

先将几个我在安装过程中遇到的问题:

1.安装时最好明白自己要安装那些服务。依据自己的实际须要而定,我一次安装就由于漏选了openssh,后来重装了。

2.重装能够不用先卸载。直接点击setup.exe,进行安装,

3.那个选择下载网站就选默认的就好了http://mirrons.163.com。

4.安装ssh服务时配置无password是总是出错

错误例如以下:删掉.ssh目录,用password登陆也是不成功。试了好几次,也重装了cygwin64位还是无效,最后安装cygwin32位的才干够。

Administrator@L ~
$ cd ~/.ssh Administrator@L~/.ssh
$ ssh localhost
Administrator@localhost's password:
2 [main] sshd 3804 D:\SofeWare\cygwin\usr\sbin\sshd.exe: *** fatal error - NtCreateEvent(lock): 0xC0000058
Connection to localhost closed.

注意配置 ssh的时候,yes/no的选择要小心点,不小心就会出错。

Administrator@L ~
$ ssh-host-config *** Info: Generating missing SSH host keys
ssh-keygen: generating new host keys: RSA1 RSA DSA ECDSA ED25519
*** Info: Creating default /etc/ssh_config file
*** Info: Creating default /etc/sshd_config file *** Info: StrictModes is set to 'yes' by default.
*** Info: This is the recommended setting, but it requires that the POSIX
*** Info: permissions of the user's home directory, the user's .ssh
*** Info: directory, and the user's ssh key files are tight so that
*** Info: only the user has write permissions.
*** Info: On the other hand, StrictModes don't work well with default
*** Info: Windows permissions of a home directory mounted with the
*** Info: 'noacl' option, and they don't work at all if the home
*** Info: directory is on a FAT or FAT32 partition.
*** Query: Should StrictModes be used? (yes/no) no *** Info: Privilege separation is set to 'sandbox' by default since
*** Info: OpenSSH 6.1. This is unsupported by Cygwin and has to be set
*** Info: to 'yes' or 'no'.
*** Info: However, using privilege separation requires a non-privileged account
*** Info: called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/README.privsep.
*** Query: Should privilege separation be used? (yes/no) no
*** Info: Updating /etc/sshd_config file *** Query: Do you want to install sshd as a service?
*** Query: (Say "no" if it is already installed as a service) (yes/no) yes
*** Query: Enter the value of CYGWIN for the daemon: [] ntsec
*** Info: On Windows Server 2003, Windows Vista, and above, the
*** Info: SYSTEM account cannot setuid to other users -- a capability
*** Info: sshd requires. You need to have or to create a privileged
*** Info: account. This script will help you do so. *** Info: It's not possible to use the LocalSystem account for services
*** Info: that can change the user id without an explicit password
*** Info: (such as passwordless logins [e.g. public key authentication]
*** Info: via sshd) when having to create the user token from scratch.
*** Info: For more information on this requirement, see
*** Info: https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1 *** Info: If you want to enable that functionality, it's required to create
*** Info: a new account with special privileges (unless such an account
*** Info: already exists). This account is then used to run these special
*** Info: servers. *** Info: Note that creating a new user requires that the current account
*** Info: have Administrator privileges itself. *** Info: No privileged account could be found. *** Info: This script plans to use 'cyg_server'.
*** Info: 'cyg_server' will only be used by registered services.
*** Query: Do you want to use a different name? (yes/no) no
*** Query: Create new privileged user account 'LYX\cyg_server' (Cygwin name: 'cyg_server')? (yes/no) no
*** ERROR: There was a serious problem creating a privileged user.
*** Query: Do you want to proceed anyway? (yes/no) no Administrator@L ~
$ ssh-host-config *** Info: Generating missing SSH host keys
*** Query: Overwrite existing /etc/ssh_config file? (yes/no) yes
*** Info: Creating default /etc/ssh_config file
*** Query: Overwrite existing /etc/sshd_config file? (yes/no) yes
*** Info: Creating default /etc/sshd_config file *** Info: StrictModes is set to 'yes' by default.
*** Info: This is the recommended setting, but it requires that the POSIX
*** Info: permissions of the user's home directory, the user's .ssh
*** Info: directory, and the user's ssh key files are tight so that
*** Info: only the user has write permissions.
*** Info: On the other hand, StrictModes don't work well with default
*** Info: Windows permissions of a home directory mounted with the
*** Info: 'noacl' option, and they don't work at all if the home
*** Info: directory is on a FAT or FAT32 partition.
*** Query: Should StrictModes be used? (yes/no) yes *** Info: Privilege separation is set to 'sandbox' by default since
*** Info: OpenSSH 6.1. This is unsupported by Cygwin and has to be set
*** Info: to 'yes' or 'no'.
*** Info: However, using privilege separation requires a non-privileged account
*** Info: called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/README.privsep.
*** Query: Should privilege separation be used? (yes/no) no
*** Info: Updating /etc/sshd_config file *** Query: Do you want to install sshd as a service?
*** Query: (Say "no" if it is already installed as a service) (yes/no) yes
*** Query: Enter the value of CYGWIN for the daemon: [] netsec
*** Info: On Windows Server 2003, Windows Vista, and above, the
*** Info: SYSTEM account cannot setuid to other users -- a capability
*** Info: sshd requires. You need to have or to create a privileged
*** Info: account. This script will help you do so. *** Info: It's not possible to use the LocalSystem account for services
*** Info: that can change the user id without an explicit password
*** Info: (such as passwordless logins [e.g. public key authentication]
*** Info: via sshd) when having to create the user token from scratch.
*** Info: For more information on this requirement, see
*** Info: https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1 *** Info: If you want to enable that functionality, it's required to create
*** Info: a new account with special privileges (unless such an account
*** Info: already exists). This account is then used to run these special
*** Info: servers. *** Info: Note that creating a new user requires that the current account
*** Info: have Administrator privileges itself. *** Info: No privileged account could be found. *** Info: This script plans to use 'cyg_server'.
*** Info: 'cyg_server' will only be used by registered services.
*** Query: Do you want to use a different name? (yes/no) yes
*** Query: Enter the new user name: l
*** Query: Reenter: l *** Query: Create new privileged user account 'LYX\lyx' (Cygwin name: 'l')? (yes/no) yes
*** Info: Please enter a password for new user lyx. Please be sure
*** Info: that this password matches the password rules given on your system.
*** Info: Entering no password will exit the configuration.
*** Query: Please enter the password:
*** Query: Reenter: *** Warning: Creating the user 'l' failed! Reason:
▒û▒▒▒▒▒▒▒▒▒▒▒▒ƿ▒▒Բ▒ͬ▒▒ ▒▒▒▒▒ NET HELPMSG 2253 ▒Ի▒ø▒▒▒İ▒▒▒▒▒ *** ERROR: There was a serious problem creating a privileged user.
*** Query: Do you want to proceed anyway? (yes/no) yes
*** Warning: Expected privileged user 'lyx' does not exist.
*** Warning: Defaulting to 'SYSTEM' *** Info: The sshd service has been installed under the LocalSystem
*** Info: account (also known as SYSTEM). To start the service now, call
*** Info: `net start sshd' or `cygrunsrv -S sshd'. Otherwise, it
*** Info: will start automatically after the next reboot. *** Warning: Host configuration exited with 1 errors or warnings!
*** Warning: Make sure that all problems reported are fixed,
*** Warning: then re-run ssh-host-config. Administrator@LYX ~
$ ssh localhost
The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is SHA256:5/i9vvXBBfiqhzLrekd9uqPPhKz7NC+9zNwcWLn+qhk.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
Administrator@localhost's password: Administrator@LYX ~
$ who
Administrator pty1 2015-07-24 09:39 (::1)

安装教材:

网上安装教材非常多。我就不赘述了。

在windows系统中通过cygwin安装hadoop:http://my.oschina.net/u/570654/blog/112757

依照这篇安装cygwin就能够。

Cygwin-安装和配置ssh服务的更多相关文章

  1. Linux下安装并配置SSH服务

    一.使用命令检测Linux系统上是否已经安装了SSH服务:(命令:rpm -qa |grep ssh) 二.如果没有安装SSH软件包,可以通过yum 或rpm安装包进行安装(命令:yum instal ...

  2. Sco Openserver下 配置SSH服务(图解)

    Sco Openserver下 配置SSH服务 好久没玩儿Sco Unix系统了,春节过后为邮政系统的一个朋友调试系统( 装了个远程服务) ,这两天将安装过程回忆了一下,总结出来给大家分享. 本试验需 ...

  3. Windows7安装Bitvise开启ssh服务

    Windows7安装Bitvise开启ssh服务 by:铁乐猫 在Liunx和windows10上配置SSH服务是一件很容易的事,毕竟系统己经自带了ssh的服务功能. 不过在windows7上可不容易 ...

  4. Ubuntu配置SSH服务

    本文主要解决Ubuntu配置SSH服务的问题 1.1.修改可用的agt源 sudo vim /etc/apt/sources.list 1.2.更新代码包 sudo apt-get update 2. ...

  5. OpenVAS漏洞扫描基础教程之OpenVAS概述及安装及配置OpenVAS服务

    OpenVAS漏洞扫描基础教程之OpenVAS概述及安装及配置OpenVAS服务   1.  OpenVAS基础知识 OpenVAS(Open Vulnerability Assessment Sys ...

  6. Kali Linux常用服务配置教程安装及配置DHCP服务

    Kali Linux常用服务配置教程安装及配置DHCP服务 在Kali Linux中,默认没有安装DHCP服务.下面将介绍安装并配置DHCP服务的方法. 1.安装DHCP服务 在Kali Linux中 ...

  7. OpenStack-Ocata版+CentOS7.6 云平台环境搭建 — 6.在计算节点上安装并配置计算服务Nova

    安装和配置计算节点这个章节描述如何在计算节点上安装和配置计算服务. 计算服务支持几种不同的 hypervisors.为了简单起见,这个配置在计算节点上使用 :KVM <kernel-based ...

  8. 配置ssh服务允许root管理员直接登录

    配置ssh服务允许root管理员直接登录 [root@linux-node2 ~]# grep PermitRootLogin /etc/ssh/sshd_config PermitRootLogin ...

  9. CentOS7系列--2.2CentOS7中配置SSH服务

    CentOS7配置SSH服务 1. SSH配置 1.1. 使用SSH服务更加安全 [root@centos7 ~]# vi /etc/ssh/sshd_config 设置如下 PermitRootLo ...

  10. 004-ubuntu安装配置SSH服务

    一.ssh安装. 1.# sudo apt-get -y install openssh-server. 2.在/etc/ssh/sshd_config文件中添加一句:PermitRootLogin ...

随机推荐

  1. sql server创建外键,子母表,级联删除。

    级联删除. 最近建一个合同关系,在原有的资产平台上添加维保合同关系,维保合同问题, 需要在后面添加资产的维保合同,使用ef,该添加的冗余字段都已经添加上了,现在做这个,删除的时候只删了主表提示出问题, ...

  2. mysql server5.7 找不到my.ini,只有my-default.ini【mysql全局配置文件】

    起因是在尝试将csv文件导入mysql的table时,出现如下错误: “The MySQL server is running with the --secure-file-priv option s ...

  3. How do I list all fields of an object in Objective-C?

    http://stackoverflow.com/questions/1213901/how-do-i-list-all-fields-of-an-object-in-objective-c As m ...

  4. Linux文件查找命令find,xargs详述【转】

    转自:http://blog.csdn.net/cxylaf/article/details/4069595 转自http://www.linuxsir.org/main/?q=node/137 Li ...

  5. android studio 无法调试debug,(能运行安装)

    请检查清单文件的改为true就可以调试了 android:debuggable="true"

  6. Selenium2+python自动化2-pip降级selenium3.0【转载】

    selenium版本安装后启动Firefox出现异常:'geckodriver' executable needs to be in PATH selenium默默的升级到了3.0,然而网上的教程都是 ...

  7. C# Socket的粘包处理(转)

    http://www.cnblogs.com/aarond/p/Socket111.html 当socket接收到数据后,会根据buffer的大小一点一点的接收数据,比如: 对方发来了1M的数据量过来 ...

  8. 洛谷 P1094 纪念品分组【贪心/双指针/最少多少组合法不要求连续的两两捆绑】

    题目描述 元旦快到了,校学生会让乐乐负责新年晚会的纪念品发放工作.为使得参加晚会的同学所获得 的纪念品价值相对均衡,他要把购来的纪念品根据价格进行分组,但每组最多只能包括两件纪念品, 并且每组纪念品的 ...

  9. HDU 5915 The Fastest Runner Ms. Zhang (CCPC2016 长春 E题,分类讨论 + 求字典序最小的直径 + 数据结构寻找最小值)

    题目链接  CCPC2016 Changchun Problem E 题意  给定一个$n$个点$n$条边的无向图,现在从某一点$s$出发,每个点都经过一遍,最后在$t$点停止,经过的边数为$l$   ...

  10. Activator常用方法

    1.获取图片 public static Image getImage(String key) {        Image img = getDefault().getImageRegistry() ...