免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
论坛 操作系统 BSD sshd
最近访问板块 发新帖
查看: 1524 | 回复: 4
打印 上一主题 下一主题

sshd [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-03-06 14:16 |只看该作者 |倒序浏览
启动信息:
Could not load host key: /etc/ssh/ssh_host_key
Disabling protocol version 1. Could not load host key
Privilege separation user sshd does not exist


/etc/ssh/sshd_config内容如下:
# This is ssh server systemwide configuration file.
#
# $FreeBSD: src/crypto/openssh/sshd_config,v 1.4.2.5 2001/01/18 22:36:53 green E
xp $

Port 22
Protocol 2,1
ListenAddress 192.168.1.1
#ListenAddress ::
HostKey /etc/ssh/ssh_host_key
HostDsaKey /etc/ssh/ssh_host_dsa_key
ServerKeyBits 768
LoginGraceTime 120
KeyRegenerationInterval 3600
PermitRootLogin no
# ConnectionsPerPeriod has been deprecated completely

# After 10 unauthenticated connections, refuse 30% of the new ones, and
# refuse any more than 60 total.
MaxStartups 10:30:60
# Don't read ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
StrictModes yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd yes
KeepAlive yes

# Logging
SyslogFacility AUTH
LogLevel INFO
#obsoletes QuietMode and FascistLogging

RhostsAuthentication no
#
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
#
RSAAuthentication yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords no
# Uncomment to disable s/key passwords
#SkeyAuthentication no
#KbdInteractiveAuthentication yes

# To change Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#AFSTokenPassing no
#KerberosTicketCleanup no

# Kerberos TGT Passing does only work with the AFS kaserver
#KerberosTgtPassing yes

#UseLogin no

# Uncomment if you want to enable sftp
#Subsystem      sftp    /usr/libexec/sftp-server
/etc/ssh/sshd_config: 61 lines, 1541 characters.
localhost# sshd
Could not load host key: /etc/ssh/ssh_host_key
Disabling protocol version 1. Could not load host key
Privilege separation user sshd does not exist
localhost# cat /etc/ssh/sshd_config
# This is ssh server systemwide configuration file.
#
# $FreeBSD: src/crypto/openssh/sshd_config,v 1.4.2.5 2001/01/18 22:36:53 green Exp $

Port 22
Protocol 2,1
ListenAddress 192.168.1.1
#ListenAddress ::
HostKey /etc/ssh/ssh_host_key
HostDsaKey /etc/ssh/ssh_host_dsa_key
ServerKeyBits 768
LoginGraceTime 120
KeyRegenerationInterval 3600
PermitRootLogin no
# ConnectionsPerPeriod has been deprecated completely

# After 10 unauthenticated connections, refuse 30% of the new ones, and
# refuse any more than 60 total.
MaxStartups 10:30:60
# Don't read ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
StrictModes yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd yes
KeepAlive yes

# Logging
SyslogFacility AUTH
LogLevel INFO
#obsoletes QuietMode and FascistLogging

RhostsAuthentication no
#
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
#
RSAAuthentication yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords no
# Uncomment to disable s/key passwords
#SkeyAuthentication no
#KbdInteractiveAuthentication yes

# To change Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#AFSTokenPassing no
#KerberosTicketCleanup no

# Kerberos TGT Passing does only work with the AFS kaserver
#KerberosTgtPassing yes

#UseLogin no

# Uncomment if you want to enable sftp
#Subsystem      sftp    /usr/libexec/sftp-server



/etc/rc.conf的内容如下:

# -- sysinstall generated deltas -- # Sun Feb 29 08:59:16 2004
# Created: Sun Feb 29 08:59:16 2004
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
kern_securelevel_enable="NO"
linux_enable="YES"
nfs_reserved_port_only="YES"
sendmail_enable="NONE"
usbd_enable="NO"
network_interfaces="rl0 rl1 lo0"
ifconfig_rl0="inet 211.80.202.140 netmask 255.255.255.0"
ifconfig_rl1="inet 192.168.1.1 netmask 255.255.255.0"
ifconfig_lo0="inet 127.0.0.1"
defaultrouter="211.80.202.254"
gateway_enable="YES"
hostname="localhost"
firewall_enable="YES"
sshd_enable="YES"
#firewall_type="/etc/ipfw.conf"
firewall_script="/etc/rc.firewall"
firewall_type="OPEN"
firewall_quiet="NO"
firewall_logging_enable="YES"


natd_enable="YES"
natd_interface="rl0"
natd_flags="-config /etc/natd.conf"


# -- sysinstall generated deltas -- # Fri Mar  5 11:38:48 2004
moused_enable="YES"


/etc/ssh/下的文件阿
primes                  ssh_host_dsa_key        sshd_config
ssh_config              ssh_host_dsa_key.pub

论坛徽章:
0
2 [报告]
发表于 2004-03-06 15:55 |只看该作者

sshd

HostKey /etc/ssh/ssh_host_key
这个目录下面应该有2个key文件的呀,如果你编译 ssh ,这些文件应该是自动生成的。不然,就用 ssh-keygen 重新生成一遍

论坛徽章:
0
3 [报告]
发表于 2004-03-06 22:47 |只看该作者

sshd

ssh-keygen过了,目录下也多了相关的文件,但是还是那样

好象是这样的ssh-keygen -t dsa -f /etc/ssh/ssh_host_key -N ""

论坛徽章:
0
4 [报告]
发表于 2004-03-08 01:06 |只看该作者

sshd

HostKey /etc/ssh/ssh_host_key
HostDsaKey /etc/ssh/ssh_host_dsa_key

我机器上这两行是注销的,用的默认的吧

论坛徽章:
0
5 [报告]
发表于 2004-03-08 07:21 |只看该作者

sshd

thanks
I have reinstall it,than it works,thank you all the same
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP