I'm trying to setup SSH authentication between my VPS and Bitbucket for configure later automatic deployment via Capistrano (for web projects) and Capifony (for Symfony2 projects) so I follow this steps:
- Login in my VPS as root and execude the command
cd ~
and that point me at/root
home. - Run the command
ssh-keygen -t rsa -C "my_email@example.com"
- Then I added the key to ssh-agent by running the command
ssh-add ~/.ssh/id_rsa
- Finally I try to test if all goes fine by running
ssh -T "my_email@example.com"@bitbucket.org
but get this error:
Permission denied (publickey).
What I miss? Any help or advice?