Open tatosjb opened 2 years ago
@tatosjb : I was able to use the native linux binary for tsh in wsl2.
Just need to use the allocated ip address (ip addr
) with --bind-addr
on tsh login
.
Another useful instruction would be how to use your fido2/U2F device through WSL.
Maybe this helps someone, I logon using the Windows client then use the configs from .tsh
-folder directly in WSL
tsh
on Windows (Teleport Connect) and WSLtsh.exe
in WSL with (if it is on C:
)
powershell.exe -c "(Get-Command tsh).Source" | sed 's/\\/\//g' | sed 's/C:/\/mnt\/c/'
.tsh
folder in WSL
ln -s /mnt/c/Users/$profile_folder/.tsh/ ~/.tsh
~/.bashrc
tsh() {
if [[ $@ == login* ]]; then
command /mnt/c/$wsl_path_to_tsh_exe "$@"
else
command tsh "$@"
fi
}
This wil use the tsh.exe
to login with your Webauthn device, it works with my fingerprint reader
Details
When I have tried to use tsh inside the wsl terminal, the browser does not open. To solve this I had to uninstall teleport from the debian(inside wsl) and I download the windows version. Extracted it to a folder (e.g. c:/teleport), copied the tsh.exe and renamed it to just tsh (without the extension ) and add the path to debian bash (e.g. export PATH="$PATH:/mnt/c/teleport"). The steps should be like:
Download teleport Extract the files to
c:/program files
Create a copy of the executabletsh.exe
astsh
(without the extension) Add the path to your WSL bashexport PATH="$PATH:/mnt/c/program files/teleport"
Category