romkatv / zsh4humans

A turnkey configuration for Zsh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSH teleport is not working in WSL when SSH config folder is mounted with fstab

mcshosho opened this issue · comments

When ssh config folder form Windows is mounted with fstab on a WSL instance (Ubuntu, does not matter the version 22.04 or 23.10), ssh connection fails with this error:

unix_listener: cannot bind to path /home/andrei/.ssh/s/e8ce35630dc6ae7e3892ed896558821d73a6618f.lemWZfRZ3qy2fx0n: Operation not supported

The temporary solution is to change in -z4h-ssh-cmd ControlPath to be somewhere outside of ".ssh" folder (like .tmp/s instead of .ssh/s), but this change is overwritten at next "z4h update" command.

Can this folder (or whole ssh comand parameters block) be set as a configurable item?

Create ~/.ssh/config with the content suggested by https://github.com/romkatv/zsh4humans/blob/master/tips.md#ssh-config and modify ControlPath in there.

Thanks. This kind of solved my initial problem, but now I got into another one: ControlPath is not supported on Windows side, which means that I can't use the same config file on Windows and WSL in same time.

That's unfortunate. This falls into the category of issues that I'm not going to work on (see the disclaimer at the top of https://github.com/romkatv/zsh4humans). If you find a solution, please post an update here.

I found the solution: in WSL add the ssh configuration configuration not in ~/.ssh/config directly, but into another file ~/.ssh/wsl_config.

Thanks for posting the solution!