Open devoldoak opened 1 year ago
Hi @devoldoak, thank you for reporting this issue. We are currently facing a couple of issues with ssh on windows, so we'd need to investigate
info Starting VSCode... then info Waiting for devpod agent to come up... info Waiting for devpod agent to come up... info Waiting for devpod agent to come up...
[Windows 11 .ssh/config]
# DevPod Start ms-php.devpod
Host ms-php.devpod
ForwardAgent yes
LogLevel error
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
ProxyCommand "C:\Program Files\DevPod\devpod-cli.exe" ssh --stdio --context default --user vscode ms-php
User vscode
# DevPod End ms-php.devpod
[devpod-cli debug log]
C:\Program Files\DevPod>devpod-cli.exe ssh --debug --stdio --context default --user vscode ms-php
12:51:49 debug Acquire workspace lock...
12:51:49 debug Acquired workspace lock...
12:51:49 debug execute inject script
12:51:49 debug download agent from https://github.com/loft-sh/devpod/releases/download/v0.3.0
12:51:49 debug Run command provider command: ${SSH_PROVIDER} command
12:51:50 debug Received line after pong: done
12:51:54 debug Successfully connected to host
12:51:54 debug Run container tunnel
12:51:54 info Execute SSH server command: bash -c '/tmp/devpod/agent' agent container-tunnel --workspace-info 'H4sIAAAAAAAA/+yTX4/aOhDFv8s8J+Qff0LeEMtluXcvrNhQtVUk5NgTcDeJLdthd4X47pUJy1IVVKlvlfpo+cz4jOd39vAi1LOWhCIke+AMEqi0K7cSHGguji7DgjSlcQN/2BuEpBjEcb9b+HGMvhsHyHJwoBAlQwUJjJMsW2lUOssk11TUbt7t+VnWYbiTgmUZFbXBV6Oz7NQ3y85GdJadLUhOTaMQEtgaI3XieUJivVFEbjsbbrZNTrRGoztUVF7uk7g36OdBHPv9Xj/I4x6JgsAfBHGfhUE0iEmObNjtMdotCjoshv4g6A+DMPbjYRSHXsWpEloUxttpKhi6Cith0DXq7d2PEjt+nHEPNamsMUW0jHJZNhocENJwUWt7PZpO5un6cZTe29OOlI1Ve6aSXvsLHtlgbew/a1SPbWMGiVENHhy4W4z/myx/qmeCPqO6VTT5nC5H638eRtMnW3RVc794Si87Wv88ym+1nM1H43T2aZZ+Waez/yeLVXqz82z+72Scrk/Ox8vJ3WSezkYPT5fPWe3tt44NprP0d6ofF8sfBgvD68rDwYGK0C2vLfMHBzjDi322q4eDA1o0qs3FhpslSqG5EertAsYWwSN8v2Ln4ABVSCweKa9QG1JJa9IPI9cfuEGc+t2kGyW94Cs4UBJtVtpaPivCIPXtddIdWsUpQRaJNkH2hZaoZA+SmO0N2ph4qUtB2Gr5cH2SUhTG1dv3OoUlEo3aey/0dn4n6vjgAK+/ITVTbsYKGdaGk1J/LKm9vTsCe1WAr0jbDTw3OaoaDer2fKL8Y5Az9rzWhpQlJFCQUiPYZdKSL865O/wN4Z8Rwu8AAAD//wEAAP//A3gLsnsGAAA=' --debug
12:51:54 info No root required, because neither docker nor agent daemon needs to be installed
12:51:54 info Use /home/pi/.devpod/agent/contexts/default/workspaces/ms-php as workspace dir
12:51:54 info Using docker command 'docker'
12:51:54 info execute inject script
12:51:54 info Received line after pong: done
12:51:55 info done inject
12:51:55 info done injecting
12:51:55 info Done InjectAgentAndExecute
12:51:55 info done exec
12:51:57 debug Successfully connected to container
12:51:57 debug Run outer container tunnel
12:51:57 info Execute SSH server command: bash -c su -c "'/usr/local/bin/devpod' helper ssh-server --track-activity --stdio --debug" 'vscode'
12:51:57 info Execute SSH server command: bash -c cat /var/run/devpod/result.json
12:51:57 debug Successfully parsed result at /var/run/devpod/result.json
12:51:57 info Execute SSH server command: bash -c '/usr/local/bin/devpod' agent container credentials-server --user 'vscode' --configure-docker-helper --debug
12:51:57 debug Received ping from agent
12:51:57 debug Start credentials server
12:51:57 debug Credentials server started on port 14081...
SSH-2.0-Go
12:52:24 debug Start refresh
12:52:24 debug Run command in container: '/tmp/devpod/agent' agent workspace update-config --workspace-info 'H4sIAAAAAAAA/+yTX4/aOhDFv8s8J+Qff0LeEMtluXcvrNhQtVUk5NgTcDeJLdthd4X47pUJy1IVVKlvlfpo+cz4jOd39vAi1LOWhCIke+AMEqi0K7cSHGguji7DgjSlcQN/2BuEpBjEcb9b+HGMvhsHyHJwoBAlQwUJjJMsW2lUOssk11TUbt7t+VnWYbiTgmUZFbXBV6Oz7NQ3y85GdJadLUhOTaMQEtgaI3XieUJivVFEbjsbbrZNTrRGoztUVF7uk7g36OdBHPv9Xj/I4x6JgsAfBHGfhUE0iEmObNjtMdotCjoshv4g6A+DMPbjYRSHXsWpEloUxttpKhi6Cith0DXq7d2PEjt+nHEPNamsMUW0jHJZNhocENJwUWt7PZpO5un6cZTe29OOlI1Ve6aSXvsLHtlgbew/a1SPbWMGiVENHhy4W4z/myx/qmeCPqO6VTT5nC5H638eRtMnW3RVc794Si87Wv88ym+1nM1H43T2aZZ+Waez/yeLVXqz82z+72Scrk/Ox8vJ3WSezkYPT5fPWe3tt44NprP0d6ofF8sfBgvD68rDwYGK0C2vLfMHBzjDi322q4eDA1o0qs3FhpslSqG5EertAsYWwSN8v2Ln4ABVSCweKa9QG1JJa9IPI9cfuEGc+t2kGyW94Cs4UBJtVtpaPivCIPXtddIdWsUpQRaJNkH2hZaoZA+SmO0N2ph4qUtB2Gr5cH2SUhTG1dv3OoUlEo3aey/0dn4n6vjgAK+/ITVTbsYKGdaGk1J/LKm9vTsCe1WAr0jbDTw3OaoaDer2fKL8Y5Az9rzWhpQlJFCQUiPYZdKSL865O/wN4Z8Rwu8AAAD//wEAAP//A3gLsnsGAAA='
12:52:24 info Execute SSH server command: bash -c '/tmp/devpod/agent' agent workspace update-config --workspace-info 'H4sIAAAAAAAA/+yTX4/aOhDFv8s8J+Qff0LeEMtluXcvrNhQtVUk5NgTcDeJLdthd4X47pUJy1IVVKlvlfpo+cz4jOd39vAi1LOWhCIke+AMEqi0K7cSHGguji7DgjSlcQN/2BuEpBjEcb9b+HGMvhsHyHJwoBAlQwUJjJMsW2lUOssk11TUbt7t+VnWYbiTgmUZFbXBV6Oz7NQ3y85GdJadLUhOTaMQEtgaI3XieUJivVFEbjsbbrZNTrRGoztUVF7uk7g36OdBHPv9Xj/I4x6JgsAfBHGfhUE0iEmObNjtMdotCjoshv4g6A+DMPbjYRSHXsWpEloUxttpKhi6Cith0DXq7d2PEjt+nHEPNamsMUW0jHJZNhocENJwUWt7PZpO5un6cZTe29OOlI1Ve6aSXvsLHtlgbew/a1SPbWMGiVENHhy4W4z/myx/qmeCPqO6VTT5nC5H638eRtMnW3RVc794Si87Wv88ym+1nM1H43T2aZZ+Waez/yeLVXqz82z+72Scrk/Ox8vJ3WSezkYPT5fPWe3tt44NprP0d6ofF8sfBgvD68rDwYGK0C2vLfMHBzjDi322q4eDA1o0qs3FhpslSqG5EertAsYWwSN8v2Ln4ABVSCweKa9QG1JJa9IPI9cfuEGc+t2kGyW94Cs4UBJtVtpaPivCIPXtddIdWsUpQRaJNkH2hZaoZA+SmO0N2ph4qUtB2Gr5cH2SUhTG1dv3OoUlEo3aey/0dn4n6vjgAK+/ITVTbsYKGdaGk1J/LKm9vTsCe1WAr0jbDTw3OaoaDer2fKL8Y5Az9rzWhpQlJFCQUiPYZdKSL865O/wN4Z8Rwu8AAAD//wEAAP//A3gLsnsGAAA='
12:52:24 debug Out:
12:52:54 debug Start refresh
12:52:54 debug Run command in container: ...
...
13:01:58 debug Out:
13:02:28 debug Start refresh
13:02:28 debug Run command in container: '/tmp/devpod/agent' agent workspace update-config --workspace-info 'H4sIAAAAAAAA/+yTX4/aOhDFv8s8J+Qff0LeEMtluXcvrNhQtVUk5NgTcDeJLdthd4X47pUJy1IVVKlvlfpo+cz4jOd39vAi1LOWhCIke+AMEqi0K7cSHGguji7DgjSlcQN/2BuEpBjEcb9b+HGMvhsHyHJwoBAlQwUJjJMsW2lUOssk11TUbt7t+VnWYbiTgmUZFbXBV6Oz7NQ3y85GdJadLUhOTaMQEtgaI3XieUJivVFEbjsbbrZNTrRGoztUVF7uk7g36OdBHPv9Xj/I4x6JgsAfBHGfhUE0iEmObNjtMdotCjoshv4g6A+DMPbjYRSHXsWpEloUxttpKhi6Cith0DXq7d2PEjt+nHEPNamsMUW0jHJZNhocENJwUWt7PZpO5un6cZTe29OOlI1Ve6aSXvsLHtlgbew/a1SPbWMGiVENHhy4W4z/myx/qmeCPqO6VTT5nC5H638eRtMnW3RVc794Si87Wv88ym+1nM1H43T2aZZ+Waez/yeLVXqz82z+72Scrk/Ox8vJ3WSezkYPT5fPWe3tt44NprP0d6ofF8sfBgvD68rDwYGK0C2vLfMHBzjDi322q4eDA1o0qs3FhpslSqG5EertAsYWwSN8v2Ln4ABVSCweKa9QG1JJa9IPI9cfuEGc+t2kGyW94Cs4UBJtVtpaPivCIPXtddIdWsUpQRaJNkH2hZaoZA+SmO0N2ph4qUtB2Gr5cH2SUhTG1dv3OoUlEo3aey/0dn4n6vjgAK+/ITVTbsYKGdaGk1J/LKm9vTsCe1WAr0jbDTw3OaoaDer2fKL8Y5Az9rzWhpQlJFCQUiPYZdKSL865O/wN4Z8Rwu8AAAD//wEAAP//A3gLsnsGAAA='
13:02:28 info Execute SSH server command: bash -c '/tmp/devpod/agent' agent workspace update-config --workspace-info 'H4sIAAAAAAAA/+yTX4/aOhDFv8s8J+Qff0LeEMtluXcvrNhQtVUk5NgTcDeJLdthd4X47pUJy1IVVKlvlfpo+cz4jOd39vAi1LOWhCIke+AMEqi0K7cSHGguji7DgjSlcQN/2BuEpBjEcb9b+HGMvhsHyHJwoBAlQwUJjJMsW2lUOssk11TUbt7t+VnWYbiTgmUZFbXBV6Oz7NQ3y85GdJadLUhOTaMQEtgaI3XieUJivVFEbjsbbrZNTrRGoztUVF7uk7g36OdBHPv9Xj/I4x6JgsAfBHGfhUE0iEmObNjtMdotCjoshv4g6A+DMPbjYRSHXsWpEloUxttpKhi6Cith0DXq7d2PEjt+nHEPNamsMUW0jHJZNhocENJwUWt7PZpO5un6cZTe29OOlI1Ve6aSXvsLHtlgbew/a1SPbWMGiVENHhy4W4z/myx/qmeCPqO6VTT5nC5H638eRtMnW3RVc794Si87Wv88ym+1nM1H43T2aZZ+Waez/yeLVXqz82z+72Scrk/Ox8vJ3WSezkYPT5fPWe3tt44NprP0d6ofF8sfBgvD68rDwYGK0C2vLfMHBzjDi322q4eDA1o0qs3FhpslSqG5EertAsYWwSN8v2Ln4ABVSCweKa9QG1JJa9IPI9cfuEGc+t2kGyW94Cs4UBJtVtpaPivCIPXtddIdWsUpQRaJNkH2hZaoZA+SmO0N2ph4qUtB2Gr5cH2SUhTG1dv3OoUlEo3aey/0dn4n6vjgAK+/ITVTbsYKGdaGk1J/LKm9vTsCe1WAr0jbDTw3OaoaDer2fKL8Y5Az9rzWhpQlJFCQUiPYZdKSL865O/wN4Z8Rwu8AAAD//wEAAP//A3gLsnsGAAA='
13:02:29 debug Out:
It still doesn't working with the update on my computer.
I tried deleting all configurations in devpod, and files on wsl server
ssh sc-perf.devpod 06:42:04 info Waiting for devpod agent to come up... 06:42:18 info Waiting for devpod agent to come up... 06:42:31 info Waiting for devpod agent to come up... 06:42:44 info Waiting for devpod agent to come up... 06:42:57 info Waiting for devpod agent to come up... 06:43:10 info Waiting for devpod agent to come up... 06:43:23 info Waiting for devpod agent to come up... 06:43:36 info Waiting for devpod agent to come up... 06:43:49 info Waiting for devpod agent to come up... 06:44:02 info Waiting for devpod agent to come up... 06:44:15 info Waiting for devpod agent to come up...
The container is up on wsl
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 345797bd1001 vsc-content-2f64a:devpod-e6dd5c59e26ee64323f10c3bb6c92aa9 "/bin/sh -c 'echo Co…" 4 days ago Up About a minute festive_curran
the ssh agent on wsl loops on
bash -c #!/bin/sh set -e # Compatibility fix for zsh shells setopt SH_WORD_SPLIT 2>/dev/null || : INSTALL_DIR="/tmp/devpod" INSTALL_FILENAME="agent" INSTALL_PATH="$INSTALL_DIR/$INSTALL_FILENAME" PREFER_DOWNLOAD="true" CHMOD_PATH="true" # start marker echo "ping" # we don't want the script to do anything without us IFS='$\n' read -r DEVPOD_PING if [ "$DEVPOD_PING" != "pong" ]; then >&2 echo "Received wrong answer for ping request $DEVPOD_PING" exit 1 fi command_exists() { command -v "$@" >/dev/null 2>&1 } is_arm() { case "$(uname -a)" in *arm* ) true;; *arm64* ) true;; *aarch* ) true;; *aarch64* ) true;; * ) false;; esac } inject() { echo "ARM-$(is_arm && echo -n 'true' || echo -n 'false')" $sh_c "cat > $INSTALL_PATH.$$" $sh_c "mv $INSTALL_PATH.$$ $INSTALL_PATH" if [ "$CHMOD_PATH" = "true" ]; then $sh_c "chmod +x $INSTALL_PATH" fi echo "done" exit 0 } download() { DOWNLOAD_URL="https://github.com/loft-sh/devpod/releases/download/v0.3.0/devpod-linux-amd64" if is_arm; then DOWNLOAD_URL="https://github.com/loft-sh/devpod/releases/download/v0.3.0/devpod-linux-arm64" fi iteration=1 max_iteration=3 while :; do if [ "$iteration" -gt "$max_iteration" ]; then >&2 echo "error: failed to download devpod" exit 1 fi cmd_status="" if command_exists curl; then $sh_c "curl -fsSL $DOWNLOAD_URL -o $INSTALL_PATH.$$" && break cmd_status=$? elif command_exists wget; then $sh_c "wget -q $DOWNLOAD_URL -O $INSTALL_PATH.$$" && break cmd_status=$? else echo "error: no download tool found, please install curl or wget" exit 127 fi >&2 echo "error: failed to download devpod" >&2 echo " command returned: ${cmd_status}" >&2 echo "Trying again in 10 seconds..." iteration=$((iteration+1)) sleep 10 done $sh_c "mv $INSTALL_PATH.$$ $INSTALL_PATH" } if [ "$(/tmp/devpod/agent version 2>/dev/null || echo 'false')" != "v0.3.0" ]; then user="$(id -un || true)" sh_c='sh -c' # Try to create the install dir, if we fail, we search for sudo # else let's continue without sudo, we don't need it. if (! mkdir -p $INSTALL_DIR 2>/dev/null || ! touch $INSTALL_PATH 2>/dev/null || ! chmod +x $INSTALL_PATH 2>/dev/null || ! rm -f $INSTALL_PATH 2>/dev/null); then if command_exists sudo; then # check if sudo requires a password if ! sudo -nl >/dev/null 2>&1; then >&2 echo Error: sudo requires a password and no password is available. Please ensure your user account is configured with NOPASSWD. exit 1 fi sh_c='sudo -E sh -c' elif command_exists su; then sh_c='su -c' else >&2 echo Error: this installer needs the ability to run commands as root. >&2 echo We are unable to find either "sudo" or "su" available to make this happen. exit 1 fi # Now that we're sudo, try again $sh_c "mkdir -p $INSTALL_DIR" fi $sh_c "rm -f $INSTALL_PATH 2>/dev/null || true" if [ "$PREFER_DOWNLOAD" = "true" ]; then download || inject else inject || download fi if [ "$CHMOD_PATH" = "true" ]; then $sh_c "chmod +x $INSTALL_PATH" fi if [ "$(/tmp/devpod/agent version 2>/dev/null || echo 'false')" != "v0.3.0" ]; then >&2 echo Error: failed to install devpod exit 1 fi fi # send parent done stream echo "done" # set download url export DEVPOD_AGENT_URL=https://github.com/loft-sh/devpod/releases/download/v0.3.0 # Execute command '/tmp/devpod/agent' helper ssh-server --stdio
I also tried to install devpod on wsl and run ssh from here. It works well. So the issue seems to be on the windows side.
Same result with another workspace ssh vscode-remote-try-node.devpod
😭 I'm in the same situation as you
@devoldoak thanks for reporting back, it's still on the to-do list. If you're interested, you could also give it a shot and open a PR. We have to do some shell workarounds on windows, and I suspect there are unix utilities that currently aren't supported with the shell emulator we're using. https://github.com/loft-sh/devpod/blob/2dcd4c1ef38e499aee1c5b1856e11be0a577b264/pkg/shell/shell.go#L52C16-L52C16
halp
Hi. I have a mistake while connecting container from ssh provider
What happened? I'm using windows 11 and WSL 2. I have a openssh server installed into Ubuntu WSL distribution. I configure the ssh provider to connect to the WSL part and it works well. (agent file is downloaded to the WSL server)
Then I define workspace settings which write this ssh config file into the windows part :
I have added --debug to the ProxyCommand to show logs.
When I'm trying to connect workspace from
ssh sc-perf.devpod
it doesn't work :But while i'm using the ProxyCommand directly without --stdio, It works well :
With --stdio I have only this output :
What did you expect to happen instead?
ssh sc-perf.devpod should work instead of waiting for devpod agent
How can we reproduce the bug? (as minimally and precisely as possible)
Using windows and docker on WSL.
Local Environment:
DevPod Provider:
Thank you for your help debugging this issue