question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Session operation has timed out inside Azure Automation

See original GitHub issue

I am trying to use Posh-SSH in an Azure Automation Runbook in order to run something on a Linux VM. My script

$password = Convertto-SecureString -String "xxxxxxx" -AsPlainText -Force
$cred = New-Object -Typename System.Management.Automation.PSCredential -ArgumentList numbers, $password
$ssh = New-SSHSession -ComputerName "example.com" -Credential $cred -AcceptKey -ConnectionTimeOut 100
$(Invoke-SSHCommand -Index 0 -Command "echo dog").Output 

runs fine from my command line, but in Azure Automation I get the error

Session operation has timed out

which is why I extended the timeout. Do you know whether Posh-SSH operate in this environment?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:27 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
yfrindelcommented, Jan 14, 2019

I had the same issue. It works with a “-ConnectionTimeout” value

0reactions
Flodu31commented, Sep 15, 2017

I’ll use the workaround of @rbyrnedugan because I can’t find a solution to this problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Investigating timeout exceptions in StackExchange.Redis ...
StackExchange.Redis uses a configuration setting named “synctimeout” for synchronous operations, which is a default value for it is 1000 ms.
Read more >
Solved: Experiencing Time Out error: “The operation has ti...
It's not that the data refresh has timed out, your SFDC session token has expired before the refresh could be completed. Power BI...
Read more >
Troubleshoot common connection issues to Azure SQL ...
These connection problems can be caused by reconfiguration, firewall settings, a connection timeout, incorrect login information, ...
Read more >
Solved: Flow time out - Power Platform Community
Hi,. I have created flows in my system, where millions of records are there. But , when the flow is triggered, its looping...
Read more >
Runbook execution in Azure Automation
Automation executes your runbooks based on the logic defined inside them. If a runbook is interrupted, it restarts at the beginning.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found