1) 前置准备,安装Visual Studio Code (VS Code)

Visual Studio Code – 代码编辑。重新

2)插件管理,安装”Remote – SSH“扩展

3)配置ssh连接实例,点击齿轮打开ssh配置文件

4)如何有如下报错信息:

Permissions for 'C:\\Users\\Administrator\\.ssh\\id_rsa-remote-ssh' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "C:\\Users\\Administrator\\.ssh\\id_rsa-remote-ssh": bad permissions

这是因为pem密钥文件的权限不对导致的

解决方法:

# 在Windows中没有chmod命令,我们需要用别的方式改权限,如果是Linux(chmod 400 ssh.pem)
右击文件-属性-安全-高级。
首先,点击窗口左下角的“禁用继承”,然后删除“权限条目”里自己以外的人。像这样:

By starbucket

Full-Stack Developer and Maintenance

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注