Cygwin-安装和配置ssh服务
来源:互联网 发布:常用的网络通信协议 编辑:程序博客网 时间:2024/05/16 19:21
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服务时配置无密码是总是出错
错误如下:删掉.ssh文件夹,用密码登陆也是不成功。试了好几次,也重装了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就可以。
0 0
- Cygwin-安装和配置ssh服务
- Cygwin-安装和配置ssh服务
- window 上安装 Cygwin 和 SSH 服务
- cygwin下安装和配置ssh笔记
- Cygwin中配置ssh服务
- 安装cygwin和ssh服务后,如何卸载
- cygwin 安装配置ssh 问题
- cygwin 安装配置ssh 问题
- cygwin配置 ssh服务(windows7)
- Cygwin安装和配置
- Ubuntu下面安装ssh服务和配置
- 安装配置ssh服务
- Win7下安装Cygwin以及配置ssh
- cygwin架设SSH服务
- cygwin 的安装和配置
- Cygwin下配置ssh的问题--sshd服务没启动
- CYGWIN SSH Server 配置
- CYGWIN SSH Server 配置
- POJ 2251 Dungeon Master(bfs)
- 正则表达式 “双向最小匹配”
- EntityFramework走马观花之 CRUD(上)
- Finding the factors of an integer
- ssoj2435 回文串游戏(贪心)
- Cygwin-安装和配置ssh服务
- 第一次面试有感
- 深入浅出MyBatis-Configuration
- UI 动画之反射变换的旋转
- 直击阻塞,非阻塞,异步,同步四者联系与区别
- xml解析 dom4j通过XPath找标签
- 写出最小公因数
- 最小生成树kruskal算法(并查集)
- Linux之rpm命令管理