Can you modify the settings.php file using drush?
What you really need here is different settings.php files for your production and development environments.

There are multiple ways of achieving this, some examples:


Setting various environments (development, production) based on the URL
Environment Specific settings.php Overrides


I usually include the following lines at the end of the settings.php file (in all instances):

// Override settings in this file.
if (file_exists('./' . conf_path() . '/local_settings.php')) {
  include_once './' . conf_path() . '/local_settings.php';
}


And then change the $databases array there, and any other specific environment settings.

You may also find useful the following links:


Defining variables in a site's settings.php $conf array
Set Environment module, that helps maintaining multiple environments with drush.