免费注册 查看新帖 |

Chinaunix

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

[FreeBSD] Server refused our key 已解决! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-06-17 12:00 |只看该作者 |倒序浏览
putty ---> openssh server

提示:
Server refused our key
另外还有一个对话框提示:
PuTTY Fatal Error


Disconnected: No supported authentication methods available

只是希望使用公匙认证来登入.
---------------------------------------------------------------------------------
sshd_config:
# This is the sshdserver system-wide configuration file.
See

# sshd_config(5) formore information.

# This sshd wascompiled with PATH=

# The strategy used foroptions in the default sshd_config shipped with
# OpenSSH is to specifyoptions with their default value where
# possible, but leavethem commented.
Uncommented optionschange a

# default value.

Port 22
AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# Disable legacy (protocolversion 1) support in the server for new
# installations. Infuture the default will change to require explicit
# activation ofprotocol 1
Protocol 2

# HostKey for protocolversion 1
#HostKey/etc/ssh/ssh_host_key
# HostKeys for protocolversion 2
#HostKey/etc/ssh/ssh_host_rsa_key
#HostKey/etc/ssh/ssh_host_dsa_key

# Lifetime and size ofephemeral version 1 server key
KeyRegenerationInterval1h
ServerKeyBits 1024

# Logging
# obsoletes QuietModeand FascistLogging
SyslogFacility AUTH
LogLevel INFO

# Authentication:

LoginGraceTime 2m
PermitRootLogin no
StrictModes yes
MaxAuthTries 6
MaxSessions 10

RSAAuthentication no
PubkeyAuthenticationyes
AuthorizedKeysFile .ssh/authorized_keys

# For this to work youwill also need host keys in /etc/ssh/ssh_known_hosts
RhostsRSAAuthenticationno
# similar for protocolversion 2
HostbasedAuthenticationno
# Change to yes if youdon't trust ~/.ssh/known_hosts for
#RhostsRSAAuthentication and HostbasedAuthentication
IgnoreUserKnownHosts no
# Don't read the user's~/.rhosts and ~/.shosts files
IgnoreRhosts yes

# Change to yes toenable built-in password authentication.
PasswordAuthenticationno
PermitEmptyPasswords no

# Change to no todisable PAM authentication
ChallengeResponseAuthenticationno

# Kerberos options
#KerberosAuthenticationno
#KerberosOrLocalPasswdyes
#KerberosTicketCleanupyes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthenticationno
#GSSAPICleanupCredentialsyes

# Set this to 'no' todisable PAM authentication, account processing,
# and sessionprocessing. If this is enabled, PAM authentication will
# be allowed throughthe ChallengeResponseAuthentication and
#PasswordAuthentication.
Depending onyour PAM configuration,

# PAM authenticationvia ChallengeResponseAuthentication may bypass
# the setting of"PermitRootLogin without-password".
# If you just want thePAM account and session checks to run without
# PAM authentication,then enable this but set PasswordAuthentication
# andChallengeResponseAuthentication to 'no'.
#UsePAM yes

#AllowAgentForwardingyes
AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparationyes
#PermitUserEnvironmentno
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile/var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none

# no default bannerpath
#Banner none

# override default ofno subsystems
Subsystem      sftp  /usr/libexec/sftp-server

# Example of overridingsettings on a per-user basis
#Match User anoncvs
#
X11Forwarding no

#
AllowTcpForwarding no

#
ForceCommand cvs server

AllowUsers     asdfwang

我是在openssh 这边ssh-keygen -t rsa 生成的用户id_rsa

昨天,我有连接成功过,今天一来就不行了。无论怎么搞都这样子。
请问:怎么搞定?


[ 本帖最后由 firecpk 于 2009-6-17 13:20 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2009-06-17 13:19 |只看该作者
搞定。

原因是:
AllowUsers    asdfwang  another_user_name
是由space分隔的。
被我打成了逗号。

论坛徽章:
0
3 [报告]
发表于 2015-11-20 16:27 |只看该作者
您好!!我是在windows中使用putty工具,遇到跟你一样的问题,请问该怎么解决??

论坛徽章:
223
2022北京冬奥会纪念版徽章
日期:2015-08-10 16:30:32操作系统版块每日发帖之星
日期:2016-05-10 19:22:58操作系统版块每日发帖之星
日期:2016-02-18 06:20:00操作系统版块每日发帖之星
日期:2016-03-01 06:20:00操作系统版块每日发帖之星
日期:2016-03-02 06:20:0015-16赛季CBA联赛之上海
日期:2019-09-20 12:29:3219周年集字徽章-周
日期:2019-10-01 20:47:4815-16赛季CBA联赛之八一
日期:2020-10-23 18:30:5320周年集字徽章-20	
日期:2020-10-28 14:14:2615-16赛季CBA联赛之广夏
日期:2023-02-25 16:26:26CU十四周年纪念徽章
日期:2023-04-13 12:23:10操作系统版块每日发帖之星
日期:2016-05-10 19:22:58
4 [报告]
发表于 2015-11-26 16:07 |只看该作者
你们到底要配置ssh server什么啊,默认的不是挺好的么
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP