免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 11413 | 回复: 15
打印 上一主题 下一主题

Cygwin下安装SSH失败 [复制链接]

论坛徽章:
1
摩羯座
日期:2013-10-23 12:41:02
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-11-04 02:04 |只看该作者 |倒序浏览

*** 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: 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) yes
*** Warning: The owner and the Administrators need
*** Warning: to have .w. permission to /var/run.
*** Warning: Here are the current permissions:
*** Warning: drwxr-xr-x 2 dingjian None 0 Nov  2 19:37 /var/run
*** Warning: Please change the user and/or group ownership and
*** Warning: permissions of /var/run.
*** ERROR: Problem with /var/run directory. Exiting.
就是想在Windows端安装OpenSSH,但是错了这样的错误。
1.就是SSH有问题,其他Cygwin下面的程序是可以的;
2.相同的安装程序在其他地方可以安装的,就是SSH可以使用;
3.本PC一直都是失败。

论坛徽章:
5
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:50:282015年亚洲杯之朝鲜
日期:2015-03-13 22:47:33IT运维版块每日发帖之星
日期:2016-01-09 06:20:00IT运维版块每周发帖之星
日期:2016-03-07 16:27:44
2 [报告]
发表于 2008-11-04 08:45 |只看该作者

回复 #1 dj_ukyo 的帖子

更改/var/run的访问权限。

论坛徽章:
15
2015年辞旧岁徽章
日期:2015-03-03 16:54:15双鱼座
日期:2015-01-15 17:29:44午马
日期:2015-01-06 17:06:51子鼠
日期:2014-11-24 10:11:13寅虎
日期:2014-08-18 07:10:55酉鸡
日期:2014-04-02 12:24:51双子座
日期:2014-04-02 12:19:44天秤座
日期:2014-03-17 11:43:36亥猪
日期:2014-03-13 08:13:51未羊
日期:2014-03-11 12:42:03白羊座
日期:2013-11-20 10:15:18CU大牛徽章
日期:2013-04-17 11:48:45
3 [报告]
发表于 2008-11-04 09:43 |只看该作者
不用命令行安装,cygwin里带ssh 包,你可以重新运行setup, 选择安装即可。

论坛徽章:
5
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:50:282015年亚洲杯之朝鲜
日期:2015-03-13 22:47:33IT运维版块每日发帖之星
日期:2016-01-09 06:20:00IT运维版块每周发帖之星
日期:2016-03-07 16:27:44
4 [报告]
发表于 2008-11-04 09:45 |只看该作者

回复 #3 rdcwayx 的帖子

从贴子看,LZ所说的应该不是安装问题,而是配置问题。

论坛徽章:
15
2015年辞旧岁徽章
日期:2015-03-03 16:54:15双鱼座
日期:2015-01-15 17:29:44午马
日期:2015-01-06 17:06:51子鼠
日期:2014-11-24 10:11:13寅虎
日期:2014-08-18 07:10:55酉鸡
日期:2014-04-02 12:24:51双子座
日期:2014-04-02 12:19:44天秤座
日期:2014-03-17 11:43:36亥猪
日期:2014-03-13 08:13:51未羊
日期:2014-03-11 12:42:03白羊座
日期:2013-11-20 10:15:18CU大牛徽章
日期:2013-04-17 11:48:45
5 [报告]
发表于 2008-11-04 10:00 |只看该作者
我运行了一下这个命令,没有问题。可能楼主的PC登陆账号没有管理员权限。

或者给/var/run 写的权限:  chmod +w /var/run

$ ls -ld /var/run
drwxrwx---+ 2 rdcwayx Users 0 Dec  7  2007 /var/run
$ ssh-host-config -y
Generating /etc/ssh_host_rsa_key
Generating /etc/ssh_host_dsa_key
Generating /etc/ssh_config file
Privilege separation is set to yes by default since OpenSSH 3.3.
However, this requires a non-privileged account called 'sshd'.
For more info on privilege separation read /usr/share/doc/openssh/README.privsep.

Should privilege separation be used? (yes/no) yes
Warning: The following function requires administrator privileges!
Should this script create a local user 'sshd' on this machine? (yes/no) yes
Generating /etc/sshd_config file
Added ssh to C:\WINDOWS\system32\drivers\etc\services


Warning: The following functions require administrator privileges!

Do you want to install sshd as service?
(Say "no" if it's already installed as service) (yes/no) yes

Which value should the environment variable CYGWIN have when
sshd starts? It's recommended to set at least "ntsec" to be
able to change user context without password.
ntsec

The service has been installed under LocalSystem account.
To start the service, call `net start sshd' or `cygrunsrv -S sshd'.

Host configuration finished. Have fun!

论坛徽章:
1
摩羯座
日期:2013-10-23 12:41:02
6 [报告]
发表于 2008-11-05 03:10 |只看该作者
我也是怀疑是权限问题,但是现在还是不能肯定问题在哪儿。
JeanDing@jeanding-pc ~
$ ssh-host-config -y
*** 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: 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) yes
*** Warning: The owner and the Administrators need
*** Warning: to have .w. permission to /var/run.
*** Warning: Here are the current permissions:
*** Warning: drwxr-xr-x 2 JeanDing None 0 Nov  4 01:55 /var/run
*** Warning: Please change the user and/or group ownership and
*** Warning: permissions of /var/run.
*** ERROR: Problem with /var/run directory. Exiting.

论坛徽章:
5
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:50:282015年亚洲杯之朝鲜
日期:2015-03-13 22:47:33IT运维版块每日发帖之星
日期:2016-01-09 06:20:00IT运维版块每周发帖之星
日期:2016-03-07 16:27:44
7 [报告]
发表于 2008-11-05 09:21 |只看该作者

回复 #6 dj_ukyo 的帖子

命令的提示已经说得非常清楚了,怎么”还是不能肯定“?

论坛徽章:
0
8 [报告]
发表于 2008-11-19 19:30 |只看该作者
如果cygwin安装所在的分区不是NTFS的, 则在第6步运行$ ssh-host-config -y时会出现下面的错误:
*** Warning: The owner and the Administrators need
*** Warning: to have .w. permission to /var/run.
*** Warning: Here are the current permissions:
*** Warning: drwxr-xr-x 2 Administrator None 0 Nov 19 10:49 /var/run
*** Warning: Please change the user and/or group ownership and
*** Warning: permissions of /var/run.
*** ERROR: Problem with /var/run directory. Exiting.

此时, /var/run目录的访问权限不能被修改, 这是因为non-NTFS分区不支持权限的设定.

解决办法有二:
1. 将cygwin安装到NTFS分区即可
2. 第6步运行$ ssh-host-config, 除了下面的选"no", 其余yes即可
*** Query: Should privilege separation be used? (yes/no) no

论坛徽章:
0
9 [报告]
发表于 2008-12-17 20:55 |只看该作者
chmod 777 /var
chmod 777 /var/run

论坛徽章:
0
10 [报告]
发表于 2013-01-18 18:34 |只看该作者
请问如何更改权限?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP