ssh icon indicating copy to clipboard operation
ssh copied to clipboard

Call to undefined method Symfony\Component\Process\Process::usePrivateKey()

Open ThomUK opened this issue 8 months ago • 1 comments

When I do:

$process = Ssh::create('root', 'host_ip_here')->execute('whoami')
    ->usePrivateKey('/home/user/.ssh/id_rsa');

$result = [
    'isSuccessful' => $process->isSuccessful(),
    'output' => $process->getOutput(),
];

dd($result);

I get the error:

Call to undefined method Symfony\Component\Process\Process::usePrivateKey()

usePrivateKey is in the Ssh class, so I'm unsure what I'm doing wrong...

Thank you

ThomUK avatar Jun 22 '24 07:06 ThomUK