spatie/laravel-server-monitor

Failed run checks

gizburdt opened this issue · 6 comments

Hi, awesome package! :)

The authenticity of host '***' can't be established.
ECDSA key fingerprint is ***.
Are you sure you want to continue connecting (yes/no)? The authenticity of host '***' can't be established.
ECDSA key fingerprint is ***.
Are you sure you want to continue connecting (yes/no)? yes
***: check `diskspace` failed
forge@***:~/***$ php artisan server-monitor:run-checks
Start running 2 checks...
emeals.nl: performing check `diskspace`...
emeals.nl: performing check `mysql`...
emeals.nl: check `diskspace` failed
emeals.nl: check `mysql` failed
All done!

When I added the host for the first time, the checks ran directly, and I got this error: failed to run: Host key verification failed.

Do you know what is going wrong? :)

Thanks

And this was set in the last_run_output column: {"output": "", "exit_code": 255, "error_output": "Permission denied (publickey).\r\n", "exit_code_text": "Unknown error"}

Although we don't recommend this, you could opt to disable the host authenticity check altogether. Be aware that this will leave yourself open to man in the middle attacks. If you want to go ahead with this option add -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -q to the ssh_command_suffix key in the server-monitor config file.

More info: https://linuxcommando.blogspot.com/2008/10/how-to-disable-ssh-host-key-checking.html

Thanks for the reply :)

There is no other (safe) solution?

I didn't find an alternative solution, but I'm by no means a server expert. If you find something beter, feel free to mention it here, so I can add it to our documentation.

So, to recap. The package will only work if I run the command you gave me? FYI, I'm running the package version, not the standalone version.

Thanks again! :)

Note here: @anna-youngyeun and I just ran into this issue, and the solution for us was:

  1. SSH into the server that's running laravel-server-monitor

  2. From there, SSH into the server your app will be running its checks against

  3. When you get the prompt saying this:

    The authenticity of host '***' can't be established.
    ECDSA key fingerprint is ***.
    Are you sure you want to continue connecting (yes/no)?
    

    Type yes and hit enter; at this point you've added the remote server as a trusted server.

  4. From then on, your checks won't have this problem.