darkoperator / darkoperator/Posh-SSH
Issues connecting when "Further authentication" is prompted
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
First, Thanks quite a lot btw, fantastic module! Its saving me quite a bit of lifting to wrap putty/scp in most cases.
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
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the New-SSHSession call with a key and an OTP-backed server, then trace the keyboard-interactive authentication path used by Posh-SSH 3.0.0. Done means a session can authenticate with the key and accept the OTP code supplied through the available credentials or prompt mechanism.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100