October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

Fix SSH Refusing ssh-dss Keys: PubkeyAcceptedKeyTypes Explained

A practical guide to diagnosing ssh-dss failures, choosing HostKeyAlgorithms versus PubkeyAcceptedAlgorithms, checking effective OpenSSH settings, and migrating away from weak DSA keys.
Length9 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If SSH refuses an ssh-dss key, first identify whether the failure occurs while the server presents its host key or while your user key is being authenticated. Use HostKeyAlgorithms +ssh-dss for a legacy DSA host key, and use PubkeyAcceptedAlgorithms +ssh-dss (called PubkeyAcceptedKeyTypes on older OpenSSH releases) for a DSA user key. Both are compatibility exceptions for a weak algorithm, not permanent fixes.

What ssh-dss means and why OpenSSH rejects it

ssh-dss is the SSH name for the DSA public-key algorithm. OpenSSH 7.0 and later disable DSA by default because its cryptographic design is no longer considered strong enough. OpenSSH describes DSA as using a 160-bit private key with SHA-1 and an estimated security level of approximately 80-bit symmetric equivalent.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

That default affects policy, not necessarily the key file itself. A DSA public key may still be present in ~/.ssh/authorized_keys on the remote account, yet authentication can fail because the server refuses to accept that key type. The same algorithm can also be rejected earlier when a server offers only a DSA host key. Those are different negotiations and require different options.

Use a temporary +ssh-dss exception only for the one legacy endpoint you must reach. The durable answer is to upgrade or reconfigure the remote software and replace DSA keys with Ed25519, ECDSA or a current RSA key using SHA-2 signatures.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Identify which SSH stage is failing

What is being negotiated Typical symptom Option involved Where the exception is set
Server host key Unable to negotiate ... no matching host key type found. Their offer: ssh-dss HostKeyAlgorithms SSH client command line or client configuration
User public-key authentication The connection reaches authentication, but a DSA key in authorized_keys is not accepted PubkeyAcceptedAlgorithms; older releases use PubkeyAcceptedKeyTypes Client policy, server policy, or both, depending on which side excludes DSA

The names are easy to mix up. HostKeyAlgorithms concerns the server proving its identity to the client. PubkeyAcceptedAlgorithms and its older spelling concern a user proving identity with a public key. Changing one does not automatically change the other.

Read the error literally

If the error says that the other side offered only ssh-dss, the server is presenting an old DSA host key. The client has not yet reached user authentication, so changing PubkeyAcceptedKeyTypes will not solve that message.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If host-key negotiation succeeds but the login is refused after your key is tried, the problem is the user-key policy. In that case, the relevant setting is the accepted public-key algorithm list, not the host-key list.

Fix a legacy DSA host key negotiation failure

Use this path when the client reports that the server offered ssh-dss as a host-key type and no common host-key algorithm exists.

  1. Try the exception once from a shell so it applies only to this connection:
    ssh -o HostKeyAlgorithms=+ssh-dss user@legacyhost

    The + appends DSA to the normal host-key algorithms instead of replacing the defaults.

  2. If the one-time connection works, create a narrowly scoped client entry in ~/.ssh/config:
    Host legacyhost
        HostKeyAlgorithms +ssh-dss

    Use the exact host alias you type with SSH. Do not put this directive under Host *.

  3. Connect through the alias and confirm that the failure has moved past host-key negotiation. A successful host-key exchange does not prove that a DSA user key will be accepted; user authentication is a separate policy check.
  4. Record that the exception exists and schedule a host-key migration. Once the server offers a modern host key, remove the HostKeyAlgorithms +ssh-dss line.

This setting changes what the client is willing to accept from that server. It does not upgrade the server’s key, and it should not be used as a global default.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

Fix a DSA user-key authentication failure

Use this path when the remote account has your DSA public key in authorized_keys, host-key negotiation succeeds, and authentication still fails because DSA is excluded from the accepted public-key algorithms.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Current OpenSSH spelling

On current OpenSSH releases, add the algorithm to the accepted list for the affected connection:

ssh -o PubkeyAcceptedAlgorithms=+ssh-dss user@legacyhost

To make the exception host-specific in the client configuration:

Host legacyhost
    PubkeyAcceptedAlgorithms +ssh-dss

The client will retain its normal accepted algorithms and append DSA for this host.

Older OpenSSH spelling

Older releases name the same setting PubkeyAcceptedKeyTypes. Use the spelling that the installed client understands:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
ssh -o PubkeyAcceptedKeyTypes=+ssh-dss user@legacyhost

Or in ~/.ssh/config:

Host legacyhost
    PubkeyAcceptedKeyTypes +ssh-dss

PubkeyAcceptedKeyTypes is the older name; PubkeyAcceptedAlgorithms is the current name. They refer to the same policy area, so do not assume that a configuration copied from an old system will be recognized unchanged by a newer one.

When the server policy is the blocker

The server also has a policy controlling which public-key algorithms it accepts for user authentication. If the client offers DSA but the server excludes it, a client-side setting alone cannot override the server. The administrator must make a temporary, host-specific server configuration exception using the spelling supported by that server release, then reload the SSH service according to that system’s normal procedure.

Keep the DSA public key in the intended account’s authorized_keys and treat acceptance of that key type as a temporary bridge. The presence of the key file does not bypass the algorithm policy.

Use both exceptions only when both stages require them

An especially old appliance may offer only a DSA host key and require a DSA user key. In that case, both negotiations can fail independently. A host-specific client block can contain both directives:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Host legacyhost
    HostKeyAlgorithms +ssh-dss
    PubkeyAcceptedAlgorithms +ssh-dss

On an older client, replace the second line with PubkeyAcceptedKeyTypes +ssh-dss. If only one stage fails, add only the corresponding line. Keeping the exception minimal reduces exposure and makes later removal unambiguous.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

Check what your installed client actually supports

Do not guess the option spelling or assume that a setting in a file is effective. OpenSSH includes queries for both the supported key types and the final configuration after host matching.

  1. List key types known by the client:
    ssh -Q key

    This reports the key types supported by the installed SSH client. It helps distinguish a policy refusal from a client that was built without a particular type.

  2. Print the effective configuration for the destination:
    ssh -G user@legacyhost | grep -Ei 'hostkeyalgorithms|pubkeyaccepted(algorithms|keytypes)'

    The ssh -G output reflects host matching, included files and option precedence. Check whether the expected directive appears under the spelling your client recognizes.

  3. Compare the result with the host alias you actually use. A block for legacyhost will not match a different name unless the configuration includes that name or an alias.
  4. After the connection works, remove unrelated wildcard entries. A broad rule can silently make every SSH destination accept DSA.

Why the plus sign is safer than replacing the algorithm list

OpenSSH’s algorithm-list syntax treats a leading + as an append operation. For example:

HostKeyAlgorithms +ssh-dss

This keeps the client’s normal algorithms and adds DSA as an extra choice. Without the plus sign, assigning a list can replace the defaults, potentially removing modern host-key algorithms and causing other connections to fail or fall back to weaker choices.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The same rule applies to PubkeyAcceptedAlgorithms +ssh-dss and the older PubkeyAcceptedKeyTypes +ssh-dss. Append the legacy type; do not replace the entire list with a single obsolete algorithm.

A one-time -o command is preferable while diagnosing. If repeated access is unavoidable, use a single named Host block. Avoid a global wildcard exception, because it allows DSA wherever that configuration file is used.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Client-side versus server-side configuration

Question Host-key negotiation User-key authentication
Who is proving identity? The server proves its identity to the client with a host key The user proves identity to the server with a private/public key pair
Primary option HostKeyAlgorithms PubkeyAcceptedAlgorithms or older PubkeyAcceptedKeyTypes
Common failure wording No matching host-key type; server offers ssh-dss Authentication fails even though the DSA public key is in authorized_keys
Typical temporary action Append ssh-dss on the client for one host Append ssh-dss on the client and, if necessary, permit it in the server’s accepted-algorithm policy
Permanent answer Configure the server with a modern host key Generate and deploy a modern user key, then remove DSA acceptance

Keeping these roles separate prevents a common troubleshooting loop: changing a user-authentication setting when the connection never got past the server’s host key, or changing host-key settings when the server is rejecting the user’s DSA signature.

Security implications of re-enabling DSA

DSA’s limitation is structural rather than a cosmetic naming issue. OpenSSH documents a 160-bit private key and SHA-1, with approximately 80-bit symmetric-equivalent security. Modern OpenSSH therefore disables ssh-dss by default.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Appending DSA restores compatibility but does not make the algorithm stronger. The exception should be constrained to the legacy endpoint, used for the shortest practical period, and documented so another administrator does not mistake it for a recommended baseline.

  • Prefer a per-host configuration block over Host *.
  • Use a one-time ssh -o option while confirming the diagnosis.
  • Do not replace the complete modern algorithm list with ssh-dss.
  • Restrict access to the legacy system through the surrounding network and account controls available in your environment.
  • Remove both DSA exceptions after migration and verify the effective configuration again with ssh -G.

Migration: replace the weak key instead of keeping the exception

OpenSSH’s recommended resolution is to upgrade or reconfigure the software at the other end and replace weak key types with safer modern types. Treat the compatibility setting as a bridge to that work.

For a server host key

  1. Identify the SSH server or appliance software that offers only ssh-dss.
  2. Upgrade or reconfigure it so that it presents a modern host key.
  3. Test a normal connection without HostKeyAlgorithms +ssh-dss.
  4. Remove the DSA host-key exception from the matching Host block.

For a user key

  1. Generate a modern user key supported by both endpoints, such as Ed25519, ECDSA or a current RSA key using SHA-2 signatures.
  2. Install the new public key for the intended account on the remote system.
  3. Open a separate test session with the modern key before deleting or disabling the old DSA key.
  4. Remove PubkeyAcceptedAlgorithms +ssh-dss or PubkeyAcceptedKeyTypes +ssh-dss from the client and any temporary server policy exception.
  5. Retest from a clean shell and confirm that the connection no longer depends on DSA.

Keep the old key available only long enough to avoid locking out a required legacy account. Once the modern path is confirmed, retire the DSA key and its policy exception together.

Troubleshooting by symptom

Symptom Likely stage Next action
no matching host key type found. Their offer: ssh-dss Server host-key negotiation Try ssh -o HostKeyAlgorithms=+ssh-dss user@legacyhost, then scope the setting to that host
Host-key negotiation succeeds, but the DSA user key is refused User authentication Try the current PubkeyAcceptedAlgorithms=+ssh-dss spelling or the older PubkeyAcceptedKeyTypes=+ssh-dss spelling supported by the client
The client accepts DSA but the server still rejects login Server-side user-key policy Have the server administrator permit DSA temporarily, then plan migration
The option appears to do nothing Configuration mismatch or wrong host block Run ssh -G user@legacyhost, check the recognized spelling and verify that the host pattern matches
Adding one exception breaks other connections Algorithm list was replaced or rule was global Use the + prefix and move the directive into a specific Host block

Practical command and configuration checklist

  • Capture the exact error before changing policy.
  • Decide whether the failure names a host-key type or occurs during user authentication.
  • Check supported key types with ssh -Q key.
  • Inspect effective settings with ssh -G user@legacyhost.
  • Use HostKeyAlgorithms +ssh-dss only for a DSA host key.
  • Use PubkeyAcceptedAlgorithms +ssh-dss, or the older PubkeyAcceptedKeyTypes +ssh-dss, only for DSA user authentication.
  • Keep every exception under a named host rather than a wildcard.
  • Replace DSA with a modern host key or user key as soon as the endpoint permits it.
  • Remove the exception and verify the clean configuration after migration.

Bottom line

HostKeyAlgorithms and PubkeyAcceptedKeyTypes/PubkeyAcceptedAlgorithms solve different SSH failures. Use the first when an old server offers only an ssh-dss host key; use the second when a DSA user key is being excluded by authentication policy. Prefix the exception with +, scope it to one legacy host, and regard it as temporary. Because DSA is weak and disabled by default in modern OpenSSH, upgrading the endpoint and deploying a modern key is the correct permanent fix.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.