Closed dnsnx closed 3 years ago
Ok, we found out what was causing the error.
We added the NOHUP_LOG
option in .env
and got more specific error messages.
It turned out, that the www-data
user needed to accept the connection once:
The authenticity of host 'targetserver.com (159.xxx.xxx.xxx)' can't be established. ECDSA key fingerprint is SHA256:pmqqqH66/07274hns4L8eYLRQbyjcSaP4lQzRihBxma. Are you sure you want to continue connecting (yes/no/[fingerprint])?
But in the end we saw it is not the best way to use the www-data
user to establish the ssh connection and used a different user.
We are facing an issue with the solution. We are running a Debian Linux.
The connection cannot be established. For example, when we run the
php artisan migrate
command, we get the following error:But when running the command
/usr/bin/ssh -N -i /home/user/.ssh/user_id_rsa -L 13306:127.0.0.1:3306 -p 22 user@targetserver.com
manually, the connection can be established without any error.
I know the location of the rsa key file is differently, but it is the same key. We copied to a different location and set the permissions to the
www-data
user.This is from the
laravel.log
file: