连接到远程 Linux 计算机Connect to Your remote Linux computer

进行生成时,将 Linux 代码复制到远程 Linux 计算机,然后根据在 Visual Studio 中选择的设置在该系统上进行编译。When building, Linux code is copied to your remote Linux computer and then compiled on that system according to the settings chosen in Visual Studio. 若要设置此远程连接:To setup this remote connection:

  1. 首次生成项目或手动创建新条目的方法:选择“工具 > 选项”,然后打开“跨平台 > 连接管理器”节点,单击“添加”按钮。Build the project for the first time or manually create a new entry by selecting Tools > Options and then open the Cross Platform > Connection Manager node and click the Add button.

    连接管理器

    在任一方案中,均将显示“连接到远程系统”窗口。In either scenario, the Connect to Remote System window will be displayed.

    连接到远程系统

  2. 输入以下信息:Enter the following information:

    条目Entry 说明Description
    主机名Host Name 目标设备的名称或 IP 地址Name or IP address of your target device
    端口Port 运行 SSH 服务的端口,通常为 22Port that the SSH service is running on, typically 22
    用户名User name 要进行身份验证的用户User to authenticate as
    身份验证类型Authentication type 同时支持密码或私钥Password or Private Key are both supported
    密码Password 输入的用户名的密码Password for the entered user name
    私钥文件Private key file 为 ssh 连接创建的私钥Private key created for ssh connection
    密码Passphrase 与上面选择的私钥一起使用的密码Passphrase used with private key selected above
  3. 单击“连接”按钮,尝试连接到远程计算机。Click the Connect button to attempt a connection to the remote computer. 如果连接失败,则需要更改的输入框将以红色标出。If the connection fails, the entry boxes which need to be changed will be outlined in red.

    连接管理器错误