Use the specified private key to log in to the remote server through vscode

No matter how I entered the path before, it was wrong, but the following path format can be used:

Host 你的服务器ip
  HostName 还是你的服务器ip
  User 你的用户名
  IdentityFile ~/.ssh/私钥名
  Port 端口

Before, my IndentityFile kept showing that there was a problem and could not be connected, but changing the path to ~/.ssh/private key name was enough. You can log in using the following methods on the terminal:

ssh -i 私钥名 -p 端口号 你的用户名@你的服务器ip

Guess you like

Origin blog.csdn.net/weixin_42988382/article/details/122987685