When you connect to a ssh remote in vscode, then you can open the Extensions panel. You can find that the Copilot plugin can be chosen to be installed in SSH.