sshnet / sshnet/SSH.NET

Issues connecting when "Further authentication" is prompted

Open
#915 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
4.4k
Forks
993
Avg merge
9d 21h
Merged PRs (30d)
1

Description

Referencing darkoperator/posh-ssh#443

The author of said project has responded saying SSH.NET does not support further authentication prompts.
The server in question requires both a username+key, followed by a prompt for an OTP code.

When using said project:
Using PoSH-SSH 3.0.0 does not work for me when the server is setup to accept keys, with a prompt during auth for OTP.
Example: auth using "user" with key (empty pass), in PuTTy its seen as:

login as: user
Authenticating with public key "rsa-key...." from agent
Further authentication required
Keyboard-interactive authentication prompts from server:
| OTP Code: 

This is how I try to connect, it fails with "New-SSHSession : No suitable method found to complete authentication (keyboard-interactive)"

$key = C:\temp\test.key
$IP = "10.10.10.10"
$cred = Get-Credential
New-SSHSession -Computername $IP -KeyFile $key -Credential $cred

Any thoughts on how I can pass the OTP code for a proper auth?
I have the OTP token as a variable. I've also tried to set it as the password for the $cred, to no avail.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source file, test, or entry point. Start by reproducing the public-key-then-OTP flow described through PoSH-SSH and SSH.NET, then trace the keyboard-interactive authentication path; done means a server requiring both methods can complete authentication with the supplied OTP.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.