Shared server guidance · Question & answer

How do I find my Windows profile and .ssh folder?

Your local .ssh directory normally sits inside your Windows profile. Use the environment variable for the current Windows account rather than assuming a fixed username or drive. This is separate from the server account’s home directory.

BeginnerWindows 11 with Microsoft OpenSSH Client; Windows PowerShell 5.1 or PowerShell 7 as labelledLinux VPS and dedicated servers where a remote Linux command is shown
Go to the answer

Instructions

1. Find the profile in PowerShell

Inspect the local account’s profile path and list its SSH directory if it exists.

Local Windows PowerShell
$env:USERPROFILE
Get-ChildItem -LiteralPath "$env:USERPROFILE\.ssh" -Force

-Force includes hidden entries. Listing filenames does not display private-key contents.

2. Use the CMD equivalent when appropriate

These commands belong in Command Prompt. The /d option changes drive as well as directory.

Local Windows CMD
cd /d "%USERPROFILE%"
dir /a ".ssh"

The listing may include config, known_hosts, public keys and private-key filenames.

3. Check which account owns the shell

An elevated shell opened as a different administrator can have a different profile. Keep your personal login key in the intended user context; do not copy private keys into shared application folders.

Local Windows PowerShell
whoami

Compare the current Windows identity with the profile you expected.

Check the result

  • The profile path belongs to the Windows account you intend to use.
  • The expected key and configuration filenames are visible.

Troubleshooting

The .ssh directory does not exist
No key or host record may have been created for this account yet. Absence alone is not a Windows fault.
The key is in a different profile
Use the correct account or an authorised explicit path; do not loosen another user’s permissions.

Official references

Use the documentation for your installed version when a flag, service name or platform feature differs.