You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何查找Windows 7本地OpenSSH服务器登录凭据及解决Putty连接权限问题

Fixing OpenSSH Login Credential Issues on Windows 7 with PuTTY

Let's walk through why you're hitting this "access denied" error and how to get the right login credentials sorted out.

First: Forget the /etc/passwd file on Windows

Windows' OpenSSH implementation doesn't rely on the Unix-style /etc/passwd file for user authentication—it uses Windows' native local user account system instead. That empty or unhelpful passwd file you found is normal here; it's just a compatibility mapping file that rarely has the user info you need.

The Correct Login Credentials Are Your Windows 7 Local User Details

Your SSH login should use a valid local Windows 7 account and its corresponding password. Here's how to confirm and use them properly:

  • Find your valid local usernames: Open a Command Prompt (cmd.exe) and run net user—this will list all active local user accounts on your Windows 7 machine. These are the usernames you should try.
  • Use the right username format: If you're logging in locally (from PuTTY on the same machine or a networked device), you might need to prefix the username with .\ to avoid confusion with domain accounts (e.g., .\Vladislav instead of just Vladislav).
  • Double-check the password: The password you need is exactly the password you use to log into that Windows account—if you set a separate password during OpenSSH installation, it likely synced with your Windows account password, so stick to your regular login password first.

Fix Common Configuration Issues That Cause "Access Denied"

Even with the right credentials, these settings might block your login:

  1. Enable password authentication in SSH config:

    • Open the hidden C:\ProgramData\ssh\sshd_config file (use Notepad or a text editor with admin rights).
    • Look for the line PasswordAuthentication—make sure it's set to yes (remove any leading # to uncomment it if needed).
    • Save the file, then restart the OpenSSH SSH Server service (open Services via services.msc, find the service, right-click > Restart).
  2. Verify user access permissions:

    • In the same sshd_config file, check for AllowUsers or AllowGroups lines. If these are set, your username must be listed here (e.g., AllowUsers Vladislav). If they're commented out or missing, all local users are allowed by default.
    • Ensure your Windows account isn't disabled—run net user <your-username> in Command Prompt to check the "Account active" status.
  3. PuTTY-specific tweaks:

    • In PuTTY's Session window, make sure you're connecting to the correct IP (localhost for local testing, or your Windows 7 machine's network IP) on port 22.
    • Go to Connection > SSH > Auth and uncheck "Attempt authentication using Pageant" if you don't have an SSH key set up—this forces PuTTY to prompt for a password.
    • Alternatively, go to Connection > SSH and set "Preferred authentication method" to password to prioritize password login over key-based attempts.

Test the Credentials Locally First

To rule out PuTTY issues, open a Command Prompt and run ssh <your-username>@localhost—if this works, the problem is likely with your PuTTY configuration, not the credentials.

内容的提问来源于stack exchange,提问作者Vladislav Vazhenin

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 09:39:32