Drush Aliases into Remote Hosts not Working - Tried everything I've been struggling with a drush-related issue for awhile now and have more 'evidence' to write about. So here's what's going on: I'm trying to drush INTO two different servers (one on bluehost, another on rochen) and I get the same errors when I use my local drush on my computer to drush into either server. The error is Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

I get this error trying to drush @rochen status OR drush @bluehost status (the @name being the name of my alias files rochen.aliases.drushrc.php and bluehost.aliases.drushrc.php respectively.

I have installed drush on both servers already and can do drush commands on both using putty terminal.

I can drush just fine into Pantheon and any local sites I setup. I can also SSH into both rochen and bluehost just fine using Putty (I'm on Windows). 

If I use drush --root=/home/username/public_html --uri=websiteurl status
it returns results...which is weird because I thought that command was supposed to be the same as doing drush @alias status which gives the error. 

So I think maybe I have something wrong with my alias. See my alias file (I've confirmed the root is OK with my sysadmin):

&lt;?php
$aliases['bluehost'] = array(
    'root' =&gt; '/home/username/public_html',
    'uri' =&gt; 'http://url.com',
    'remote-host' =&gt; 'url.com',
    'remote-user' =&gt; 'username',
);

// the following line is something I've tried to add in hopes it would help but it doesnt
//$options['ssh-options'] = '-o PasswordAuthentication=no -i C:/keys/ppkfile.ppk';


SOLUTION:

I fixed the permission denied error, the stdin: not a tty error, AND the bash: drush: command not found errors all in one fell swoop. See here: http://learningwithsage.com/wp/?p=236.
Try this first:

ssh-copy-id username@url.com


Make sure that the username and url match what is in your alias, of course.  The "Permission denied" error is complaining that the remote site does not have your public key stored in its "authorized keys" file.  ssh-copy-id will fix this for you.

If you are on a Mac, you can get ssh-copy-id from here:

https://github.com/beautifulcode/ssh-copy-id-for-OSX

It should be bundled with openssh on linux.