Skip to content

SSH Key Authentication Fails with macOS Ventura #1003

Closed
@mauroa

Description

@mauroa

When I try to authenticate with an RSA SSH key from Windows into macOS Ventura, I get a Permission denied (publickey). error. However, If I run the same code against macOS Monterrey, it works correctly.
I'm attaching a repro solution so you can give it a try.

Repro Steps:

  • Pre-requisites:

    • Copy the content of the testKey.pub file (included in the test project) into /Users/.<userName>/ssh/authorized_keys in the Mac
  • Assign the corresponding values to the host and userName variables in the Program.cs file of the attached project

  • Build and run the console app

Expected Results: the console should connect to the host with the given username and included private key (testKey)

Current Results: the console doesn't connect and show a Permission denied (publickey). error instead

Notes:

  • The attached SSH key pair has been generated using this command: ssh-keygen -b 2048 -t rsa -m PEM -f "<filePath/>" -q -N "<passPhrase/>"

  • If I try to SSH connect to macOS Ventura with a Windows command prompt using the same key, it works correctly

SshNetVenturaRepro.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions