cygwin安装sshd服务(win7)Error installing a service: OpenSCManager: Win32 error 5:
- Error installing a service: OpenSCManager: Win32 error 5:
- sony@sony-VAIO~ $ ssh-host-config
- *** Info: Generating /etc/ssh_host_key
- *** Info: Generating /etc/ssh_host_rsa_key
- *** Info: Generating /etc/ssh_host_dsa_key
- *** Info: Generating /etc/ssh_host_ecdsa_key
- *** Info: Creating default /etc/ssh_config file
- *** Info: Creating default /etc/sshd_config file
- *** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
- *** Info: However, this requires a non-privileged account called 'sshd'.
- *** Info: For more info on privilege separation read /usr/share/doc/openssh/READ
- ME.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] 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: You appear to be running Windows XP 64bit, Windows 2003 Server,
- *** Info: or later. On these systems, it's not possible to use the LocalSystem
- *** Info: account for services that can change the user id without an
- *** Info: explicit password (such as passwordless logins [e.g. public key
- *** Info: authentication] via sshd).
- *** Info: If you want to enable that functionality, it's required to create
- *** Info: a new account with special privileges (unless a similar 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: sony
- *** Query: Reenter: sony
- *** Warning: Privileged account 'sony' was specified,
- *** Warning: but it does not have the necessary privileges.
- *** Warning: Continuing, but will probably use a different account.
- *** Warning: The specified account 'sony' does not have the
- *** Warning: required permissions or group memberships. This may
- *** Warning: cause problems if not corrected; continuing...
- *** Query: Please enter the password for user 'sony':
- *** Query: Reenter:
- *** Info: The sshd service has been installed under the 'sony'
- *** Info: account. To start the service now, call `net start sshd' or
- *** Info: `cygrunsrv -S sshd'. Otherwise, it will start automatically
- *** Info: after the next reboot.
- *** Info: Host configuration finished. Have fun!
sony@sony-VAIO~ $ ssh-host-config *** Info: Generating /etc/ssh_host_key
*** Info: Generating /etc/ssh_host_rsa_key
*** Info: Generating /etc/ssh_host_dsa_key
*** Info: Generating /etc/ssh_host_ecdsa_key
*** Info: Creating default /etc/ssh_config file
*** Info: Creating default /etc/sshd_config file
*** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
*** Info: However, this requires a non-privileged account called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/READ
ME.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] 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: You appear to be running Windows XP 64bit, Windows 2003 Server,
*** Info: or later. On these systems, it's not possible to use the LocalSystem
*** Info: account for services that can change the user id without an
*** Info: explicit password (such as passwordless logins [e.g. public key
*** Info: authentication] via sshd). *** Info: If you want to enable that functionality, it's required to create
*** Info: a new account with special privileges (unless a similar 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: sony
*** Query: Reenter: sony *** Warning: Privileged account 'sony' was specified,
*** Warning: but it does not have the necessary privileges.
*** Warning: Continuing, but will probably use a different account.
*** Warning: The specified account 'sony' does not have the
*** Warning: required permissions or group memberships. This may
*** Warning: cause problems if not corrected; continuing...
*** Query: Please enter the password for user 'sony':
*** Query: Reenter: *** Info: The sshd service has been installed under the 'sony'
*** Info: account. To start the service now, call `net start sshd' or
*** Info: `cygrunsrv -S sshd'. Otherwise, it will start automatically
*** Info: after the next reboot. *** Info: Host configuration finished. Have fun!
$ net start sshd
发生系统错误 1069 --- 表示由于登录失败而无法启动服务
解决方法:在cmd中输入services.msc即可打开windows的服务,在服务中把密码改对就可以了。
(在上面配置ssh的过程中我的用户名是:sony 密码是:123456)
sshd服务装成功如下:
- sony@sony-VAIO ~ $ net start sshd
- CYGWIN sshd 服务正在启动 .
- CYGWIN sshd 服务已经启动成功
sony@sony-VAIO ~ $ net start sshd
CYGWIN sshd 服务正在启动 .
CYGWIN sshd 服务已经启动成功
接下来是配置无密码登陆:
- sony@sony-VAIO ~ $ ssh-keygen -t rsa
- Generating public/private rsa key pair.
- Enter file in which to save the key (/home/sony/.ssh/id_rsa):
- Created directory '/home/sony/.ssh'.
- Enter passphrase (empty for no passphrase):
- Enter same passphrase again:
- Your identification has been saved in /home/sony/.ssh/id_rsa.
- Your public key has been saved in /home/sony/.ssh/id_rsa.pub.
- The key fingerprint is:
- e8:38:5e:e3:bb:cf:76:03:61:5f:f2:68:ed:a3:49:db sony@sony-VAIO
- The key's randomart image is:
- +--[ RSA 2048]----+
- | |
- | |
- | |
- | .o . . |
- | ..So * |
- | o . + o |
- | o + o.. |
- | . + o..o+o |
- | . +=o.+oE. |
- +-----------------+
- sony@sony-VAIO ~ $ cd .ssh/
- sony@sony-VAIO ~/.ssh $ ls
- id_rsa id_rsa.pub
- sony@sony-VAIO ~/.ssh $ cp id_rsa.pub authorized_keys
- sony@sony-VAIO ~/.ssh $ ls
- authorized_keys id_rsa id_rsa.pub
sony@sony-VAIO ~ $ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/sony/.ssh/id_rsa):
Created directory '/home/sony/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/sony/.ssh/id_rsa.
Your public key has been saved in /home/sony/.ssh/id_rsa.pub.
The key fingerprint is:
e8:38:5e:e3:bb:cf:76:03:61:5f:f2:68:ed:a3:49:db sony@sony-VAIO
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| |
| .o . . |
| ..So * |
| o . + o |
| o + o.. |
| . + o..o+o |
| . +=o.+oE. |
+-----------------+ sony@sony-VAIO ~ $ cd .ssh/ sony@sony-VAIO ~/.ssh $ ls
id_rsa id_rsa.pub sony@sony-VAIO ~/.ssh $ cp id_rsa.pub authorized_keys sony@sony-VAIO ~/.ssh $ ls
authorized_keys id_rsa id_rsa.pub
验证如下:
- sony@sony-VAIO ~/.ssh $ ssh localhost
- The authenticity of host 'localhost (::1)' can't be established.
- ECDSA key fingerprint is 5f:21:b1:24:80:92:f6:af:3e:e3:a8:f9:cb:a4:4f:ec.
- Are you sure you want to continue connecting (yes/no)? yes
- Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
- sony@sony-VAIO ~ $ who
- sony tty0 2011-11-25 15:42 (::1)
cygwin安装sshd服务(win7)Error installing a service: OpenSCManager: Win32 error 5:的更多相关文章
- cygwin安装sshd服务并实现无密码登录
http://blog.csdn.net/cybercode/article/details/7080743 这篇文章主要是为我在win7(64位)下搭建hadoop环境所准备的.首先参照在cygwi ...
- cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062: 解决办法
问题原因:很可能是/var/log的权限设置不正确.首先执行 mkpasswd 和 mkgroup 重新生成权限信息,再删除sshd服务,重新配置 解决办法: $ mkpasswd -l > / ...
- Windows安装Tomcat失败:Failed installing tomcat7 service
今天在Win7下面安装tomcat(解压版),但是安装的时候老是弹出:Failed installing tomcat6 service.猜想是Win7安全权限管理的原因.网上搜了一下果然是这样. 解 ...
- Jenkins slave-agent.jnlp 无法安装为服务(install as a service)
问题: 在部署持续集成环境,配置slave节点时遇到一个问题,slave-agent.jnlp可以正常启动运行(不能正常启动的点这里) 但是在保存为系统服务时,slave-agent.jnlp点击[i ...
- 通过cygwin安装openSSH
openSSH的安装是学习hadoop必不可少的一步,如果ssh装不好,hadoop的安装会进行不下去.本人初学hadoop时发现以前安装ssh走了一些弯路,现在又有了一些认识,所以重写了这篇日志,供 ...
- Ubuntu安装及sshd服务安装,yum安装等总结
vm网络选择自定义.指定的虚拟网络,自动桥连. 1.设置root初始密码 ubuntu安装好后,root初始密码(默认密码)不知道,需要设置.1.先用安装时候的用户登录进入系统2.输入:sudo ...
- 使用commit方式构建具有sshd服务的centos镜像
一般我们是通过SSH服务来管理服务器的,但是现在很多Docker镜像不带SSH服务,那我们该如何来管理这些容器呢?现在我们通常使用attach和nsenter工具.但是都无法解决远程管理容器的问题,当 ...
- Windows 环境 cygwin 安装 SSH
本文内容 安装环境 安装 cygwin 安装 SSH 服务 启动 sshd 服务 SSH 免密码登录 验证 SSH 是否已安装成功 验证 SSH 是否可以免密码登录本机 安装环境 Windows 20 ...
- ubuntu 安装 sshd
ubuntu 上可以安装 SSHD 服务,方便远程操作. sudo apt-get update sudo apt-get install openssh-server sudo /etc/init. ...
随机推荐
- POJ 2251-Dungeon Master (三维空间求最短路径)
Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is co ...
- Spring异常——BeanNotOfRequiredTypeException
使用junit测试ssh搭建的框架的时候,遇到了一个异常: 异常消息: org.springframework.beans.factory.BeanCreationException: Error c ...
- 深刻理解下js的prototype
参考 http://aralejs.org/class/docs/competitors.html, http://www.iteye.com/topic/248933,http://www.cnbl ...
- CSS选择器定位的使用
CSS 可以比较灵活选择控件的任意属性,一般情况下定位速度要比XPath 快,但对于初学者来说比较难以学习使用,下面我们就详细的介绍CSS 的语法与使用.一.CSS 选择器的常见语法: 例如下面一段代 ...
- python3--shelve 模块
shelve模块是一个简单的k,v将内存数据通过文件持久化的模块,可以持久化任何pickle可支持的python数据格式 import shelve d = shelve.open('shelve_t ...
- 【转】关于大型网站技术演进的思考(十九)--网站静态化处理—web前端优化—上(11)
网站静态化处理这个系列马上就要结束了,今天我要讲讲本系列最后一个重要的主题web前端优化.在开始谈论本主题之前,我想问大家一个问题,网站静态化处理技术到底是应该归属于web服务端的技术范畴还是应该归属 ...
- python去掉BOM头的方法
今天在写批量生成身份证号造数据的时候出现了问题,其中一个是报不能转成int型,后经查找,发现是utf-8BOM头的问题. 什么是BOM? 在utf-8编码文件中BOM在文件头部,占用三个字节,用来标示 ...
- [HDU2157]How many ways??(DP + 矩阵优化)
传送门 k < 20 k这么小,随便dp一下就好了... dp[i][j][k]表示从i到j经过k个点的方案数 4重循环.. 但是如果k很大就不好弄了 把给定的图转为邻接矩阵,即A(i,j)=1 ...
- 【BFS+优先级队列】Rescue
https://www.bnuoj.com/v3/contest_show.php?cid=9154#problem/I [题意] 给定一个n*m的迷宫,A的多个小伙伴R要去营救A,问需要时间最少的小 ...
- php统计图类库JpGraph
php统计图类库JpGraph JpGraph官网地址:https://jpgraph.net/. (1)下载类库: 下载地址:https://jpgraph.net/download/. 选择版本, ...