Set it up according to the normal procedure ssh in the future , But it still shows Permission denied (publickey), At this time, you need to add a configuration specification .

<>1. First, check whether the previous public key is retained in the keychain .

mac lower , Please at “keychain” Search in .

If there are any previously reserved , Please delete it , Otherwise, it will be filled automatically .

<>2. Follow the steps to create sshkey, Then join ssh-agent:
ssh-agent bash // open sshagent ssh-add -l // View joined ssh-add -D // Delete all joined id_rsa
ssh-add id_rsa // join sshagent in
<>3. Add configuration

stay "C:\Users\ Your computer's user name \.ssh" Create a new one in the directory config file , No suffix .

stay ~/.ssh/ Under the implementation
touch config open config
windows lower config Content of configuration :
be careful :id_rsa The path is a double slash
Host HostName user git IdentityFile
C:\\Users\\ Your computer's user name \\.ssh\\id_rsa
mac lower config Content of configuration :
Host HostName user git IdentityFile ~/.ssh/id_rsa
The two main items of this configuration are HostName and IdentityFile, Corresponding separately git Domain name and id_rsa Local path of .
in addition : This configuration can also control more than one computer git account .

<>4. Test it
ssh -T

©2019-2020 Toolsou All rights reserved,
A summary of the computer retest interview questions var a = 0, b = 0; function A(a) {A = function (b)... An interview question about scope 【 Data structure and algorithm 1】 Sparse array 2020—— Net tripod cup part writeupPTA-MOOC《Python Programming Zhejiang University 》 Puzzle A Chapter 2 programming problems python closure uniapp Dynamic routing parameter transfer ( Delivery object ) How to use it Python Batch import Excel Combined use Pandas integration Lambda Expression and functional interface 【Java Details of knowledge points 3】 Serializable and Deserialize