vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Remote-Containers Podman should make SSH-agent forwarding optional

Open pwolf15 opened this issue 3 years ago • 1 comments
trafficstars

Related Issue: https://github.com/microsoft/vscode-remote-release/issues/6747

When attempting to use Podman-Remote on a Windows system via the Remote-Containers plugin, I run into the following error: Error: unable to connect to Podman. failed to create sshClient: dial unix \\.\pipe\openssh-agent: connect: No connection could be made because the target machine actively refused it.

Outside of VSCode, I have no problems because SSH_AUTH_SOCK is unset (ssh-agent-forwarding is disabled due to permissions running ssh-agent in corporate environment).

On seeing this comment, I realized VSCode automatically sets SSH_AUTH_SOCK if not defined: https://github.com/microsoft/vscode-remote-release/issues/6747#issuecomment-1143388515. This puts a requirement on ssh-agent forwarding I think. Note, this same problem doesn't affect Docker.

  • VSCode Version: 1.68.1
  • Local OS Version: Windows 10
  • Remote OS Version: Oracle Linux Server release 8.6
  • Remote Extension/Connection Type: Containers (Podman)
  • Logs:
[13406 ms] Remote-Containers 0.241.3 in VS Code 1.68.1 (30d9c6cd9483b2cc586687151bcbcd635f373630)
[13406 ms] Start: Run podman version --format {{.Server.APIVersion}}
[14972 ms] Stop (1566 ms): Run: podman version --format {{.Server.APIVersion}}
[14975 ms] Cannot connect o Podman. Please verify your connection to the Linux system using `podman system connection list` or try `podman machine init` and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman. failed to create sshClient: dial unix \\.\pipe\openssh-agent: connect: No connection could be made because the target machine actively refused it.

Steps to Reproduce:

  1. Install podman-v4.1.0.msi
  2. Set Docker Path to podman: "remote.containers.dockerPath": "podman"
  3. Disable your local ssh-agent.
  4. Try to connect using Remote - Containers

pwolf15 avatar Jul 15 '22 20:07 pwolf15

In my case, I set RemoteCommand in ~/.ssh/config for another plugin, which caused the problem about SSH. If unset this setting, Remote Container(v0.251.0) with Podman(4.1.1) in remote server worked.

miya789 avatar Sep 15 '22 04:09 miya789

@pwolf15 - can you verify that this now works on the latest insiders and pre-release of the remote extension?

amunger avatar Jan 25 '24 17:01 amunger