服务器拒绝使用 PuTTY 的公钥

服务器拒绝使用 PuTTY 的公钥

我正在配置我们的新 RHEL 7 服务器,但我在尝试让它接受我的私钥/公钥对时遇到了麻烦。

与旧服务器的 sshd 配置相比,一切看起来都很相似。

当前的sshd_config

Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
KeyRegenerationInterval 3600
ServerKeyBits 1024
SyslogFacility AUTHPRIV
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile   .ssh/authorized_keys
PasswordAuthentication yes
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials yes
UsePAM yes
X11Forwarding yes
UsePrivilegeSeparation sandbox
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
Subsystem   sftp  /usr/libexec/openssh/sftp-server

使用 PuTTY 登录我收到:

Using username "jweinraub".
Server refused our key

我的权限是

drwx------. jweinraub jweinraub unconfined_u:object_r:ssh_home_t:s0 .ssh/
-rw-------. jweinraub jweinraub unconfined_u:object_r:ssh_home_t:s0 authorized_keys

并使用调试 3

debug1: trying public key file /home/jweinraub/.ssh/authorized_keys debug1: fd 4 clearing O_NONBLOCK debug2: key not found debug1: restore_uid: 0/0 debug3: mm_answer_keyallowed: key 0x7ff339f8afa0 is not allowed Failed publickey for jweinraub from 10.18.66.11 port 55147 ssh2: RSA 1c:9d:1c:c7:cf:14:48:56:4f:23:5d:cb:16:a6:1d:18 debug3: mm_request_send entering: type 23 debug2: userauth_pubkey: authenticated 0 pkalg ssh-rsa [preauth] debug3: userauth_finish: failure partial=0 next methods="publickey,password" [preauth]

相关内容