darkoperator / darkoperator/Posh-SSH

Creation a new SFTP session in an Azure Automation runbook blocks the job

Open
#283 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
1.1k
Forks
222
PR merge metrics
No merged PRs in 30d

Description

I got a runbook which uses Posh-SSH for remote SSH work.
The following code seems to unregularly fail to execute, or, to pass execution back to powershell.
New-SFTPSession -ComputerName xxx -Credential $cred -KeyString $aws_ssh_key -AcceptKey
Following commands will not be executed, leading to infinite runtime (until Azure kills the job after 3h).

This happens on approximately 15-30% of all runbook executions. I have not found a way to implement error handling for this, since this does also not seem to work in background jobs.
Background jobs in Azure using this cmdlet instantly finish, without actually executing the cmdlet.

Contributor guide

No contributing guide indexed for this repository

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

No repository file or test is named. Start by reproducing the exact New-SFTPSession command in an Azure Automation runbook, including the intermittent blocking and background-job behavior, then inspect the relevant Posh-SSH session path. Done means the failure is reliably characterized and the runbook returns control so following commands execute or a documented error is raised.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.