I'm trying to connect to a server using SSH and execute commands on that specific server. I have something that I think works but I have no way of knowing how to check if the commands are being executed on the right server. The code that is supposed to work looks like this.
config([
"remote.connections.production.host" => $droplet->ip,
"remote.connections.production.username" => $droplet->username,
"remote.connections.production.password" => $droplet->password,
]);
\SSH::into('production')->run([
'php -v',
'mysql -v',
]);
My problem is: I need to check if the commands are being executed on the server with the ip of $droplet->ip
. (This variable is not empty)
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire