Open the terminal and enter the file

cd ~/.ssh
Copy the code

Edit config file

vim config
Copy the code

File append

Host Tencent HostName **** # root@localhost IdentityFile ~/.ssh/tencent_key #Copy the code

The input:wqSave the exit



The input terminal

vim  tencent_key
Copy the code

After entering the vim view, use the code editing tool to open Ctrl+C, Ctrl+V, and enter :wq to save and exit

ssh tencent
Copy the code

The private key is tampered with

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @Copy the code

Go to /Users/wangyusheng/.ssh and delete all files except config and tencent_key

Displays a private key permission warning

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @Copy the code

Go to the.ssh folder and set the key permission to 400

chmod 400 tencent_key
Copy the code

Come on, fish man