在服务器已经配置了authorized_keys,但是还是要输入密码。
打印ssh -vvT
debug1: Host 'IP' is known and matches the ECDSA host key.
debug1: Found key in /home/xiaoyuhao/.ssh/known_hosts:7
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug2: key: /home/xiaoyuhao/.ssh/id_rsa (0x562f85e720f0), agent
debug2: key: id_rsa (0x562f85e81560), agent
debug2: key: /home/xiaoyuhao/.ssh/id_dsa ((nil))
debug2: key: /home/xiaoyuhao/.ssh/id_ecdsa ((nil))
debug2: key: /home/xiaoyuhao/.ssh/id_ed25519 ((nil))
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug2: we did not send a packet, disable method
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
No Kerberos credentials available
debug1: Unspecified GSS failure. Minor code may provide more information
No Kerberos credentials available
debug1: Unspecified GSS failure. Minor code may provide more information
debug1: Unspecified GSS failure. Minor code may provide more information
No Kerberos credentials available
debug2: we did not send a packet, disable method
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/xiaoyuhao/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Offering RSA public key: id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /home/xiaoyuhao/.ssh/id_dsa
debug1: Trying private key: /home/xiaoyuhao/.ssh/id_ecdsa
debug1: Trying private key: /home/xiaoyuhao/.ssh/id_ed25519
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
git@’IP‘'s password:
debug2: we sent a password packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Permission denied, please try again.
git@66.98.121.162's password:
debug2: we sent a password packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
我在.ssh目录下有
xiaoyuhao@xiaoyuhao-Vostro-5460:~/.ssh$ ls
id_rsa id_rsa.pub known_hosts
却不能校验
网络上大部分教程不完整导致。。。因我是git用户要给.ssh 755权限。才可使用。但大多教程700导致。