- 论坛徽章:
- 0
|
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 编辑 ] |
|