Connect VS Code or Cursor to a Remote Server over SSH

· 1 min read · #linux #ssh

To connect to a remote server via SSH,

  • Find the IP address and port of the server.

  • Download Remote-SSH for your IDE.

  • Ctrl+Shift+P on Windows or Cmd+Shift+P on Mac to open the command palette.

  • Select Remote SSH:Connect to Host.

  • Click Add New SSH Host.

  • Add the content to file by completing with the IP address and port.

Host <host name>
    HostName <ip address>
    User root
    Port <port>
    IdentityFile <path to>/.ssh/id_ed25519
  • Ctrl+Shift+P on Windows or Cmd+Shift+P on Mac to open the command palette
  • Select Remote-SSH:Connect to Host
  • Select the