How to change php version and path for php CLI requests for Magento 2?
php Current CLI PHP path of your Magento which is used by our extension when running the commands directly during the processing of PHP requests. To change it, please run bin/magento config:set amasty_base/system/cli_php_path %CLI_PHP_PATH% from the command line (ssh):
bin/magento config:set amasty_base/system/cli_php_path %CLI_PHP_PATH%