in reply to Re^2: Net::OpenSSH fails with CyberArk
in thread Net::OpenSSH fails with CyberArk

In order to avoid the incorrect parsing of the target argument you can call Net::OpenSSH (unmodified) constructor as follows:
$ssh = Net::OpenSSH->new('cyberark.internal.com', user => 'me@admin@remote.host', ...)

Regarding the capture issue, well, you would have to show us the complete script and debugging output, otherwise it is impossible to know what is going on.

Also, I don't know how CyberArk does its magic. Maybe it sets a wrapper for the real OpenSSH ssh command, and that may interfere with some of the more advanced usages of the command as the ones required by Net::OpenSSH.

Replies are listed 'Best First'.
Re^4: Net::OpenSSH fails with CyberArk
by jhuijsing (Acolyte) on Jun 25, 2022 at 07:06 UTC
    Thanks Salva That's fixed my problem Capture works correctly now