Skip to content

OpenSSH Creating a .ssh folder which isn't hidden #2348

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

Open
3 tasks done
MrGrymReaper opened this issue Apr 14, 2025 · 3 comments
Open
3 tasks done

OpenSSH Creating a .ssh folder which isn't hidden #2348

MrGrymReaper opened this issue Apr 14, 2025 · 3 comments

Comments

@MrGrymReaper
Copy link

MrGrymReaper commented Apr 14, 2025

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

  1. Initialise the OpenSSH client on new and up to date instance of Windows 10 or later. This can be done by establishing a SSH connection for the first time.
  2. Navigate to the user profile folder look for the .ssh folder.
  3. Notice that the folder is visible.

Expected behavior

The expected behaviour is for the .ssh folder to be created with the hidden bit.

Actual behavior

The .ssh folder is created without the hidden bit set however. This is confusing for any users coming from a Unix-Like environment, due to the period in front of a name indicates a hidden file or directory.

This behaviour may not align with expectations of users who are coming from Unix-like environments where such files and folders are automatically hidden.

Error details

Not applicable with this issue.

Environment data

PSVersion                      5.1.19041.5737
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.5737
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Version

The version of OpenSSH distributed in version 19045.5737 of Windows 10

Visuals

@MrGrymReaper MrGrymReaper changed the title OpenSSH Creating a folder which isn't hidden OpenSSH Creating a .ssh folder which isn't hidden Apr 14, 2025
@MrGrymReaper
Copy link
Author

I worked around this issue by manually applying the +s and +h bits to the .ssh directory in the user profile folder. As well as using a script to automate the process, due to the lack of automated handling in the OpenSSH Client to handle this situation.

My recommendation is for the team behind implementing the OpenSSH Client in Windows at Microsoft Corporation, to develop automatic handling of the system and hidden bits for .ssh folder in the client so its applied at creation.

@mgkuhn
Copy link

mgkuhn commented Apr 17, 2025

Which other Unix applications ported to Windows hide their dot file/folder by setting the hidden bit? Have you ever seen that being done (.minecraft, .git, .svn, etc.)?

I suspect hiding the folder might confuse many users. After all, .ssh contains user-serviceable parts, such as authorized_keys and config.

P.S.: http://xahlee.info/UnixResource_dir/writ/unix_origin_of_dot_filename.html

@mgkuhn
Copy link

mgkuhn commented Apr 17, 2025

See also #1709 and #1720 for an alternative suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants