ssh -T git@1.1.1.1 -vvv
最后的報錯信息:
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey).
由於是報密鑰問題,我又檢查了git上的密鑰,發現沒有問題
最后的解決辦法是發現sshd配置文件/etc/ssh/sshd_config,UsePAM沒開
vi /etc/ssh/sshd_config
修改
UsePAM yes