i am working on ssh2 key authentication in key authentication the function file_get_contents() showing the error,
here is the code
$name = $_FILES["file"] ["name"];
if($typer == 'start'){
$ssh = new Net_SSH2($host);
$key = new Crypt_RSA();
$key->loadKey(file_get_contents($name));
if (!$ssh->login($username, $key)) {
echo json_encode(array("code" =>"400", "message" => "Login Error"));
} $name = $_FILES["file"] ["name"];
if($typer == 'start'){
$ssh = new Net_SSH2($host);
$key = new Crypt_RSA();
$key->loadKey(file_get_contents($name));
if (!$ssh->login($username, $key)) {
echo json_encode(array("code" =>"400", "message" => "Login Error"));
}
showing error
file_get_contents(id_rsa): failed to open stream: No such file or directory in ssh configuration