2012-11-23 39 views
4

我想用cygwin在windows安裝sshd的安裝sshd的。但是,當我啓動sshd服務,它說:使用cygwin的

The CYGWIN sshd service is starting. 
The CYGWIN sshd service could not be started. 
The service did not report an error. 
More help is available by typing NET HELPMSG 3534. 

而且sshd.log說:

Permissions 0660 for '/etc/ssh_host_dsa_key' are too open. 
It is required that your private key files are NOT accessible by others. 
This private key will be ignored. 
bad permissions: ignore key: /etc/ssh_host_dsa_key 
Could not load host key: /etc/ssh_host_dsa_key 

那麼該如何處理呢?

回答

3

你需要確保只有cyg_server用戶可以訪問這些密鑰。

chown cyg_server /etc/ssh* 
chmod 600 /etc/ssh* 

這些命令可以做到這一點,並將允許您的sshd正確運行。

+0

我不知道如何訪問sshd.log文件('貓的/ var /日誌/ sshd.log'返回空白,甚至是我的'ls'返回空白?),但我加你說的兩個命令,仍然無法連接。任何想法? –

+0

好吧,如果我'打印在/ var /日誌/ sshd.log'它返回下列信息:'無法初始化設備PRN'。 –

+0

希望別人能提供更多的幫助......我花了很大的功夫真正得到這是怎麼回事,和一個安裝W7的,我只管理。你是否正在遵循指導來設置? – dantheman

3

我/var/log/sshd.log到底有這個:

Disabling protocol version 2. Could not load host key 
sshd: no hostkeys available -- exiting. 
/var/empty must be owned by root and not group or world-writable. 
/var/empty must be owned by root and not group or world-writable. 
/var/empty must be owned by root and not group or world-writable. 
/var/empty must be owned by root and not group or world-writable. 

位於/ var樣子,我看到這個:

$ ls /var -All 
total 0 
drwxrwxr-x+ 1 xxxx  None 0 Dec 8 15:59 cache 
drwxrwxr-x+ 1 cyg_server root 0 Dec 8 16:21 empty 
drwxrwxr-x+ 1 xxxx  None 0 Dec 8 15:58 lib 
drwxrwxrwx+ 1 xxxx  None 0 Dec 8 16:27 log 
drwxrwxrwx+ 1 xxxx  None 0 Dec 8 15:48 run 
drwxrwxrwt+ 1 xxxx  None 0 Dec 8 15:48 tmp 

所以,我只是做了chmod 600 /var/empty和固定它!