Connect from Visual Studio Code to FreeBSD reddit / freebsd ---------------------------------------------------------------------- joneum · 2023-04-02 08:23 Hi there, ich am using Visual Studio Code on a Mac M1. Now i will connect to a FreeBSD Server with it. SSH works finde from iterm (both, password and rsa). With VSCode, there is this error: ​ [10:18:34.236] Log Level: 2 [10:18:34.243] SSH Resolver called for "ssh-remote+xxx.org", attempt 1 [10:18:34.243] "remote.SSH.useLocalServer": true [10:18:34.243] "remote.SSH.path": undefined [10:18:34.243] "remote.SSH.configFile": undefined [10:18:34.243] "remote.SSH.useFlock": true [10:18:34.243] "remote.SSH.lockfilesInTmp": false [10:18:34.243] "remote.SSH.localServerDownload": auto [10:18:34.243] "remote.SSH.remoteServerListenOnSocket": false [10:18:34.244] "remote.SSH.showLoginTerminal": true [10:18:34.244] "remote.SSH.defaultExtensions": [] [10:18:34.244] "remote.SSH.loglevel": 2 [10:18:34.244] "remote.SSH.enableDynamicForwarding": true [10:18:34.244] "remote.SSH.enableRemoteCommand": false [10:18:34.244] "remote.SSH.serverPickPortsFromRange": {} [10:18:34.244] "remote.SSH.serverInstallPath": {} [10:18:34.246] VS Code version: 1.77.0 [10:18:34.246] Remote-SSH version: remote-ssh@0.98.0 [10:18:34.246] darwin arm64 [10:18:34.247] SSH Resolver called for host: xxx.org [10:18:34.247] Setting up SSH remote "xxx.org" [10:18:34.248] Acquiring local install lock: /var/folders/xm/bkqpk8594sdfq7s6bljk29gc0000gn/T/vscode-remote- ssh-377a559e-install.lock [10:18:34.249] Looking for existing server data file at /Users/xxx/Library/Application Support/Code/User/globalStorage/ms- vscode-remote.remote-ssh/vscode-ssh-host-377a559e- 7f329fe6c66b0f86ae1574c2911b681ad5a45d63-0.98.0/data.json [10:18:34.249] Using commit id "7f329fe6c66b0f86ae1574c2911b681ad5a45d63" and quality "stable" for server [10:18:34.250] Install and start server if needed [10:18:34.251] PATH: /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/b in:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applic ations/VMware Fusion.app/Contents/Public:/usr/local/share/dotnet:~/.do tnet/tools:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents /MacOS [10:18:34.251] Checking ssh with "ssh -V" [10:18:34.256] > OpenSSH_9.0p1, LibreSSL 3.3.6 [10:18:34.258] askpass server listening on /var/folders/xm/bkqpk8594sdfq7s6bljk29gc0000gn/T/vscode-ssh- askpass-220edaac1f21668348a9c6dfb115df7c13ca72a5.sock [10:18:34.258] Spawning local server with {"serverId":1,"ipcHandlePath ":"/var/folders/xm/bkqpk8594sdfq7s6bljk29gc0000gn/T/vscode-ssh-askpass -910666dc44373cdd4663488b792bb02eea1ec4d6.sock","sshCommand":"ssh","ss hArgs":["-v","-T","-D","51899","- o","ConnectTimeout=15","xxx.org"],"serverDataFolderName":".vscode- server","dataFilePath":"/Users/xxx/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode- ssh-host-377a559e-7f329fe6c66b0f86ae1574c2911b681ad5a45d63- 0.98.0/data.json"} [10:18:34.258] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.ap ple.launchd.bhpaxFm32I/Listeners","SHELL":"/bin/zsh","DISPLAY":"1","EL ECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/xxx/.vscode/extensions/m s-vscode-remote.remote-ssh-0.98.0/out/local- server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run- as-node","VSCODE_SSH_ASKPASS_MAIN":"/Users/xxx/.vscode/extensions/ms- vscode-remote.remote-ssh-0.98.0/out/askpass-main.js","VSCODE_SSH_ASKPA SS_HANDLE":"/var/folders/xm/bkqpk8594sdfq7s6bljk29gc0000gn/T/vscode- ssh-askpass-220edaac1f21668348a9c6dfb115df7c13ca72a5.sock"} [10:18:34.259] Spawned 83902 [10:18:34.326] > local-server-1> Running ssh connection command: "-v -T -D 51899 -o ConnectTimeout=15 xxx.org" [10:18:34.328] > local-server-1> Spawned ssh, pid=83907 [10:18:34.330] stderr> OpenSSH_9.0p1, LibreSSL 3.3.6 [10:18:34.564] stderr> debug1: Server host key: ssh-ed25519 SHA256:Gp2aIYqWRWljG3kQDLMMYGdkaXi1Xq5PJvEz5vvxn3o [10:18:34.882] stderr> Authenticated to xx.org ([xxx.xxx.xxx.xxx]:22) using "publickey". [10:18:34.985] > Warning: no access to tty (Bad file descriptor). > Thus no job control in this shell. [10:18:35.018] > You can change the video mode on all consoles by adding something like > the following to /etc/rc.conf: > > allscreens="80x30" > > You can use "vidcontrol -i mode | grep T" for a list of supported text > modes. > -- Konstantinos Konstantinidis > ready: 7c15cfc85472 [10:18:35.039] > FreeBSD 14.0-CURRENT FreeBSD 14.0-CURRENT #2 main-n260799-0a402ad2e6d6: Fri Feb 10 09:49:16 CET 2023 root@xxx.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC [10:18:51.260] Terminating local server [10:18:51.265] Resolver error: Error: Connecting with SSH timed out at m.Timeout (/Users/xxx/.vscode/extensions/ms-vscode- remote.remote-ssh-0.98.0/out/extension.js:1:584514) at Timeout._onTimeout (/Users/xxx/.vscode/extensions/ms-vscode- remote.remote-ssh-0.98.0/out/extension.js:1:630500) at listOnTimeout (node:internal/timers:559:17) at process.processTimers (node:internal/timers:502:7) [10:18:51.266] Local server exit: 15 [10:18:51.273] ------ I already see the welcome message from FreeBSD, but for some reason unknown to me it times out. ---------------------------------------------------------------------- linkoid01 · 2023-04-02 09:10 Was not aware that this was fixed, I remember seeing the GitHub issue about this raised many years ago. ---------------------------------------------------------------------- joneum · 2023-04-02 09:14 ok, so it's not my setup. that's good. But then there seems to be a general problem. I will search on GH ---------------------------------------------------------------------- linkoid01 · 2023-04-02 09:48 [This](https://github.com/microsoft/vscode-remote-release/issues/727) might be it. ---------------------------------------------------------------------- joneum · 2023-04-02 10:03 Same thing when I try to connect to FreeBSD with VS code from my Windows laptop. Unfortunately there is still no FreeBSD support. ---------------------------------------------------------------------- ionelp · 2023-04-02 10:11 When vscode connects, via ssh, to a remote server it will start, on the server, a nodejs app that is the actual vscode-server. This is why, on first connect, vs code will ask what os is on the remote server, so it knows what binary to run. Afaik, vscode doesn't support freebsd as is, only Linux, Mac and Windows. What you can try is to enable Linux compatibility mode on the freebsd server and when vscode asks for the remote os, pick Linux. ---------------------------------------------------------------------- mr_whats_it_to_you · 2023-04-02 10:24 I read somewhere on GitHub that the FreeBSD Comitters said, that it would be too complicated to add support for connecting with VSCode. At this point in time they rather prevent it from adding since it might break the code. I can understand that having support for VSCode would be a charm, but I guess there won‘t be ever any support. So might be the time to start using something like vim. ---------------------------------------------------------------------- joneum · 2023-04-02 12:20 Interesting. As a FreeBSD comitter I don't know anything about this. Do you still know the source? ---------------------------------------------------------------------- mr_whats_it_to_you · 2023-04-03 12:07 I checked again. It was the same link as linkoid01 provided. Didn‘t read carefully. This doesn’t have any to do with the comitters. I‘m sorry. But there are several discussions arround using VSCode for remote development on FreeBSD machines, but most of what I‘ve read so far refers back to the issue on GitHub