Is it possible to use the “code” command in SSH’ed terminal to open VS Code on local machine with SSH extension?

I found much better & simple answer thanks to this post. Simply create new script file named code with below contents & put file under any folder from $PATH. (echo $PATH to see what folders you can use) #! /usr/bin/env zsh local max_retry=10 for i in {1..$max_retry} do local script=$(echo ~/.vscode-server/bin/*/bin/remote-cli/code(*oc[$i]N)) if [[ -z ${script} … Read more

VS Code: connect a docker container in a remote server

I resolved this problem by switching to the remote server’s Docker context on my local machine: docker context create some-context-label –docker “host=ssh://user@remote_server_ip” docker context use some-context-label docker ps # A list of remote containers on my local machine! It works! After that: Connect via Remote-SSH to the container server Right click relevant container -> the … Read more

I’ve already setup the ssh key, but VSCode keeps asking for password

It was a problem with the config file. The VSCode needs the “absolute” path. In case of MacOS, ssh-copy-id seems to only copy the absolute path relative to the user. In other words, it omits “/Users/username” before “/.ssh“. Adding “/Users/username” in the IdentityFile attribute in .ssh/config solved the problem.