2017-05-15 36 views
0

我創建了公鑰和私鑰,並更新了服務器上授權密鑰文件中的公鑰。但是當我嘗試從我的Mac訪問服務器時,我仍然得到提示登錄。當我嘗試調試時,我收到下面的日誌消息。密碼減少登錄無法在mac上工作

Pradeep:~ pkumar$ ssh -v [email protected] 
OpenSSH_7.4p1, LibreSSL 2.5.0 
debug1: Reading configuration data /etc/ssh/ssh_config 
debug1: Connecting to 10.21.21.46 [10.21.21.46] port 22. 
debug1: Connection established. 
debug1: identity file /Users/pkumar/.ssh/id_rsa type 1 
debug1: key_load_public: No such file or directory 
debug1: identity file /Users/pkumar/.ssh/id_rsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /Users/pkumar/.ssh/id_dsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /Users/pkumar/.ssh/id_dsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /Users/pkumar/.ssh/id_ecdsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /Users/pkumar/.ssh/id_ecdsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /Users/pkumar/.ssh/id_ed25519 type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /Users/pkumar/.ssh/id_ed25519-cert type -1 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_7.4 
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2 
debug1: match: OpenSSH_7.2 pat OpenSSH* compat 0x04000000 
debug1: Authenticating to 10.51.1.36:22 as 'pradeep' 
debug1: SSH2_MSG_KEXINIT sent 
debug1: SSH2_MSG_KEXINIT received 
debug1: kex: algorithm: [email protected] 
debug1: kex: host key algorithm: rsa-sha2-512 
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none 
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none 
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY 
debug1: Server host key: ssh-rsa SHA256:MkMVA3YQfMFzUv3IxILEVdo0VBr1+aHuQP4YTCbZJg4 
debug1: Host '10.21.21.46' is known and matches the RSA host key. 
debug1: Found key in /Users/pkumar/.ssh/known_hosts:14 
debug1: rekey after 4294967296 blocks 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: expecting SSH2_MSG_NEWKEYS 
debug1: SSH2_MSG_NEWKEYS received 
debug1: rekey after 4294967296 blocks 
debug1: SSH2_MSG_EXT_INFO received 
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512> 
debug1: SSH2_MSG_SERVICE_ACCEPT received 
debug1: Authentications that can continue: password 
debug1: Next authentication method: password 
[email protected]'s password: 

我在哪裏出錯了。

回答

0
debug1: Authentications that can continue: password 

這表示客戶端或服務器不支持公鑰認證。客戶端可能是好的,除非你修改了/etc/ssh/ssh_config

如果您有權訪問服務器配置,請檢查服務器/etc/ssh/sshd_config並確保已啓用PubkeyAuthentication yes