ssh
ssh copied to clipboard
Call to undefined method Symfony\Component\Process\Process::usePrivateKey()
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