Is this the correct way to complete aliases.drushrc.php in order to avoid messing with other accounts? I´ve read many questions about drush in a multisite configuration. This case isn't a multisite, but several different installations in a single VPS. Something like a reseller account. They are all my sites, but I don't want to mess them up. I need drush commands to be applied to a single site each time.

I´ve installed drush using my root access, under home/root/drush.
So when I try to access ssh using one of my site´s credentials (not the root user, but one of the site´s admin), it doesn´t recognize drush commands.

Should I install drush in every single account, right outside /public_html, or should I edit the .bashrc file in any way? And in that case, how may I prevent the commands to affect other sites when I try to do something with a single specific installation?

I'm using Drupal 7 and Drush 5.x because of my php version (5.2.17).

I understand that I should have (inside the drush folder?) a file called aliases.drushrc.php, with something like this.

$aliases['site1'] = array(
    'uri' =&gt; 'mysite1.com',
    'root' =&gt; '/home/site1username/public_html',
    'remote-user' =&gt; 'site1username',
  );
$aliases['site2'] = array(
    'uri' =&gt; 'mysite2.com',
    'root' =&gt; '/home/site2username/public_html',
    'remote-user' =&gt; 'site2username',
  );


Is this correct? And how may I access drush only to a specific site?
"when I try to access ssh using one of my site´s credentials (not the
  root user, but one of the site´s admin), it doesn´t recognize drush
  commands."


The only requirements for using Drush from another user (than the one that installed it) is a) the drush directory should be readable, and b) drush should be in your PATH.

It is okay to install Drush once per user.  I use a custom move-in script to accomplish this, but in my case it's rare for me to have more than one Drush-using user on one system.  Setting the PATH in your bashrc to include the Drush directory of the root user is also fine.  [Aside: it is best to avoid calling Drush using the root user, for security's sake.  Any Drupal module can define code that runs during the execution of any Drush command.]

You aliases file looks okay, except that you only need to define remote-user for remote aliases.  The aliases you are defining are local, so remote-user will be ignored.  The alias file should go in the ~/.drush directory (inside the home directory of the user that is calling Drush).

You can download the Drush chapter of DGD7 for free; it is one of the book's sample chapters.  It does a pretty good job at describing alias files and configuration.  Although it was written for Drush 4, most of what it describes is unchanged in Drush 6 and Drush 7.  Be sure to also read all of the Drush README.

Update: Forgot to mention: to use your aliases, type drush @site1 status.  If your settings.php file is in a folder called default, then you may also access your site via cd /home/site1username/public_html &amp;&amp; drush status.