---
title: "openssh访问问题"
author: "lisanping"
date: "2009-04-04T15:21:26Z"
tags: []
slug: "openssh"
draft: false
lastmod: "2009-04-24T09:28:27Z"
id: 373740
url: "https://lisanping.iteye.com/blog/373740"
---

在自己的机子上装上了openssh，开启/usr/sbin/sshd时，总是： Could not load host key: /etc/ssh/ssh\_host\_dsa\_key Could not load host key: /etc/ssh/ssh\_host\_rsa\_key 到自己的/etc/ssh下发现没有上面两个文件，后来 /etc/rc.s/sshd start 启动服务成功，并且在/etc/ssh下生成了上面不存在的文件了 但自己的ssh localhost总是失败： ssh\_exchange\_identification: Connection closed by remote host 检查了/etc/hosts.allow和/etc/hosts.deny发现在/etc/hosts.deny中有 ALL：ALL:DENY 把这行注释掉，就OK了 enjoy it!