darkoperator / darkoperator/Posh-SSH
New-SFTPSession fails in NonInteractive mode
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
New-SFTPSession -ComputerName $HostName -Credential $cred -AcceptKey -Force
Execution of the above line gets failed , if a new server is passed (even if -AcceptKey and -Force are used). It works after first run.
Getting this error on first run:
Exception calling "ShouldContinue" with "2" argument(s): "Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available."
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 with the New-SFTPSession entry point and reproduce the command against a new server in non-interactive mode. Compare the first run with the successful second run and trace the ShouldContinue prompt; done means the first run succeeds without prompting when -AcceptKey and -Force are supplied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100