Net::ssh authenticationfailed every time!

hi, got a real serious issue with net::ssh again,

I’ve bought a new slice from slicehost running Ubuntu Gutsy 7.10, and
i’ve setup ssh to work fine via…

scp ~/.ssh/id_rsa.pub root@myipaddress:~/

once copied to the server, i move it into the .ssh directory disconnect
and try ssh from my local machine, all fine

now when i try to connect via capistrano, to make it use the new server
it keeps popping up with…

Net::SSH::AuthenticationFailed: indiehead
from
/usr/local/lib/ruby/gems/1.8/gems/net-ssh-1.1.2/lib/net/ssh/session.rb:143:in
initialize' from /usr/local/lib/ruby/gems/1.8/gems/net-ssh-1.1.2/lib/net/ssh.rb:47:in new’
from
/usr/local/lib/ruby/gems/1.8/gems/net-ssh-1.1.2/lib/net/ssh.rb:47:in
`start’
from ssh.rb:6

I’m trying…

require ‘rubygems’
require ‘net/ssh’
include Net
domain = ‘mydomain.com’ # insert IP address or domain name here
begin
Net::SSH.start( domain ) do |ssh|

end
rescue Net::SSH::HostKeyMismatch => e
puts “remembering new key: #{e.fingerprint}”
e.remember_host!
retry
end

which usually works but this time it doesn’t want to know, any ideas?

i’m using port 22 so nothing’s out of the ordinary, the app is on
another box so i’m trying to migrate it to the new slice.

appreciate any help with this, tried for hours yesterday, got nowhere.

John.

Hello John,
You made your key to connect to root@myipaddress but forgot the
username in your script so it is attempting to connect to
indiehead@myipaddress instead.

You can specify the username as the second parameter to the Net:SSH
call.

Net::SSH.start( domain, ‘root’ ) do |ssh|

Likewise in your actual capistrano recipe, you would want to add:
set :user, ‘root’

Shawn Balestracci

On Nov 25, 2007 1:00 AM, John G.

Shawn Balestracci wrote:

Hello John,
You made your key to connect to root@myipaddress but forgot the
username in your script so it is attempting to connect to
indiehead@myipaddress instead.

You can specify the username as the second parameter to the Net:SSH
call.

Net::SSH.start( domain, ‘root’ ) do |ssh|

Likewise in your actual capistrano recipe, you would want to add:
set :user, ‘root’

Shawn Balestracci

On Nov 25, 2007 1:00 AM, John G.

excellent, will try this when i get back home tonight, driving me nuts!

John G. wrote:

Shawn Balestracci wrote:

Hello John,
You made your key to connect to root@myipaddress but forgot the
username in your script so it is attempting to connect to
indiehead@myipaddress instead.

You can specify the username as the second parameter to the Net:SSH
call.

Net::SSH.start( domain, ‘root’ ) do |ssh|

Likewise in your actual capistrano recipe, you would want to add:
set :user, ‘root’

Shawn Balestracci

On Nov 25, 2007 1:00 AM, John G.

excellent, will try this when i get back home tonight, driving me nuts!

Shawn,
I was wondering, if you got that to work, since i am also having the
same issue
Thanks,
-Kamal.