Skip to Content

Pageant and agents — type your passphrase once a day

An agent keeps your decrypted key in memory and signs logins on request. You unlock the key once; PuTTY, WinSCP, plink and (with one setting) Windows ssh all use it.

Pageant

  1. Start Pageant — an icon (a computer wearing a hat) appears in the tray.
  2. Right-click → Add Key → choose id_ed25519.ppk → type the passphrase.
  3. Open PuTTY or WinSCP: no prompt at all. They ask Pageant automatically.

Start Pageant with your key at logon

  1. Press Win+R, type shell:startup, Enter.
  2. Right-click → New → Shortcut, target:
    "C:\Program Files\PuTTY\pageant.exe" "%USERPROFILE%\.ssh\id_ed25519.ppk"
  3. At the next logon Pageant asks for the passphrase once.

Windows OpenSSH agent (for PowerShell ssh)

# PowerShell as Administrator, once:
Get-Service ssh-agent | Set-Service -StartupType Automatic
Start-Service ssh-agent
# as yourself:
ssh-add $env:USERPROFILE\.ssh\id_ed25519

WinSCP 6.6 and later can also use this OpenSSH agent, so you can choose either agent — just run one, not both, to avoid confusion.

Agent forwarding

PuTTY can forward the agent to the server so you can hop on to a second server. Only enable it for servers you trust: root on that server can use your agent while you are connected.

Try it — one passphrase

  1. Add your key to Pageant.
  2. Open PuTTY lab and WinSCP to the same server — neither should ask for anything.
  3. Lock your PC, unlock, and check Pageant still holds the key (right-click → View Keys).
Rating
0 0

There are no comments for now.

to be the first to leave a comment.