Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add WinSCP troubleshooting step and tsh.exe path advice #42697

Merged
merged 9 commits into from
Jun 11, 2024

Conversation

webvictim
Copy link
Contributor

While investigating a customer issue with using WinSCP, @programmerq discovered an interesting Windows/WinSCP bug relating to path replacement which is only triggered when tsh.exe is spawned from the System32 directory.

This PR adds a troubleshooting step to the WinSCP docs explaining how to work around this issue, and adds information wherever the docs instruct people to install/extract tsh.exe to inform them not to use System32 (which is pretty bad practice anyway, and requires administrator rights)

Copy link

🤖 Vercel preview here: https://docs-10ndcvp4s-goteleport.vercel.app/docs/ver/preview

docs/pages/connect-your-client/putty-winscp.mdx Outdated Show resolved Hide resolved
docs/pages/connect-your-client/putty-winscp.mdx Outdated Show resolved Hide resolved
docs/pages/connect-your-client/putty-winscp.mdx Outdated Show resolved Hide resolved
docs/pages/connect-your-client/putty-winscp.mdx Outdated Show resolved Hide resolved
@@ -27,6 +27,11 @@ You will learn how to:

You should then unzip the archive and move `tsh.exe` to your `%PATH%`.

<Admonition type="note">
Do not place `tsh.exe` in the `System32` directory, as this can cause issues when using WinSCP.
You should use `%WINDIR%` (e.g. `C:\Windows`) or `%USERPROFILE%` (e.g. `C:\Users\<username>`) instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think %USERPROFILE% is in Path by default on Windows. At least not on my installation of Windows 11. When I googled "windows how to add exe to path", I didn't see people recommend this location either.

Should we recommend creating a folder in %USERPROFILE%, adding it to Path and then moving tsh.exe there instead? This complicates the instructions, but I don't see a better way.

FWIW, Connect adds the folder with the bundled tsh to Path during installation.


%WINDIR% is in system's Path for sure, though it's called %SystemRoot%, which generally seems to be preferred.

Copy link
Contributor Author

@webvictim webvictim Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're correct that %USERPROFILE% isn't on the path by default. With this in mind, I'm going to change the guidelines to recommend installing tsh.exe to %SystemRoot% (i.e. C:\Windows) by default and only using %USERPROFILE% if they don't have admin rights.

The other alternative is that we walk people through creating C:\Program Files\Teleport or similar, unzipping/moving tsh.exe there and then permanently adding it to the path with setx /M PATH "%PATH%;C:\Program Files\Teleport" - but this has the risk of messing up their PATH variable globally and also requires admin rights to do, when we could just use something that's already on the PATH.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good. It's a shame that there's no better alternative on Windows. Placing stuff in %SystemRoot% feels wrong, but I guess it's the closest thing to something like /usr/bin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, it's a mess. Also the fact that you can't natively unzip from the command line - you have to invoke PowerShell 😵‍💫

Co-authored-by: Paul Gottschling <[email protected]>
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from stevenGravy June 11, 2024 13:55
Copy link

🤖 Vercel preview here: https://docs-nb56lu2rk-goteleport.vercel.app/docs/ver/preview

Copy link

🤖 Vercel preview here: https://docs-3tuu72bij-goteleport.vercel.app/docs/ver/preview

Copy link

🤖 Vercel preview here: https://docs-r44d4fn4t-goteleport.vercel.app/docs/ver/preview

Copy link

🤖 Vercel preview here: https://docs-idc2bs732-goteleport.vercel.app/docs/ver/preview

Copy link

🤖 Vercel preview here: https://docs-ou5pv63we-goteleport.vercel.app/docs/ver/preview

Copy link

🤖 Vercel preview here: https://docs-iyc3qs3g7-goteleport.vercel.app/docs/ver/preview

@webvictim webvictim enabled auto-merge June 11, 2024 16:32
Copy link

🤖 Vercel preview here: https://docs-jzc6jynl5-goteleport.vercel.app/docs/ver/preview

@webvictim webvictim added this pull request to the merge queue Jun 11, 2024
Merged via the queue into master with commit b1d7443 Jun 11, 2024
38 checks passed
@webvictim webvictim deleted the gus/docs/putty-tsh-path branch June 11, 2024 17:32
@public-teleport-github-review-bot

@webvictim See the table below for backport results.

Branch Result
branch/v13 Failed
branch/v14 Failed
branch/v15 Failed
branch/v16 Create PR

webvictim added a commit that referenced this pull request Jun 12, 2024
* docs: Add WinSCP troubleshooting step and tsh.exe path advice

* Other tsh.exe locations

* Apply suggestions from code review

Co-authored-by: Paul Gottschling <[email protected]>

* Update suggested PATH and use ordered list

* Use SystemRoot instead of WINDIR and flip order

* Update admonition

* Update install-tsh.mdx

* Update putty-winscp.mdx

* Spelling error

---------

Co-authored-by: Paul Gottschling <[email protected]>
webvictim added a commit that referenced this pull request Jun 12, 2024
* docs: Add WinSCP troubleshooting step and tsh.exe path advice

* Other tsh.exe locations

* Apply suggestions from code review

Co-authored-by: Paul Gottschling <[email protected]>

* Update suggested PATH and use ordered list

* Use SystemRoot instead of WINDIR and flip order

* Update admonition

* Update install-tsh.mdx

* Update putty-winscp.mdx

* Spelling error

---------

Co-authored-by: Paul Gottschling <[email protected]>
webvictim added a commit that referenced this pull request Jun 12, 2024
* docs: Add WinSCP troubleshooting step and tsh.exe path advice

* Other tsh.exe locations

* Apply suggestions from code review

Co-authored-by: Paul Gottschling <[email protected]>

* Update suggested PATH and use ordered list

* Use SystemRoot instead of WINDIR and flip order

* Update admonition

* Update install-tsh.mdx

* Update putty-winscp.mdx

* Spelling error

---------

Co-authored-by: Paul Gottschling <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Jun 13, 2024
#42881)

* docs: Add WinSCP troubleshooting step and tsh.exe path advice

* Other tsh.exe locations

* Apply suggestions from code review



* Update suggested PATH and use ordered list

* Use SystemRoot instead of WINDIR and flip order

* Update admonition

* Update install-tsh.mdx

* Update putty-winscp.mdx

* Spelling error

---------

Co-authored-by: Paul Gottschling <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Jun 13, 2024
#42882)

* docs: Add WinSCP troubleshooting step and tsh.exe path advice

* Other tsh.exe locations

* Apply suggestions from code review



* Update suggested PATH and use ordered list

* Use SystemRoot instead of WINDIR and flip order

* Update admonition

* Update install-tsh.mdx

* Update putty-winscp.mdx

* Spelling error

---------

Co-authored-by: Paul Gottschling <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Jun 13, 2024
#42886)

* docs: Add WinSCP troubleshooting step and tsh.exe path advice

* Other tsh.exe locations

* Apply suggestions from code review



* Update suggested PATH and use ordered list

* Use SystemRoot instead of WINDIR and flip order

* Update admonition

* Update install-tsh.mdx

* Update putty-winscp.mdx

* Spelling error

---------

Co-authored-by: Paul Gottschling <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants