Hello John,
You made your key to connect to [EMAIL PROTECTED] but forgot the
username in your script so it is attempting to connect to
[EMAIL PROTECTED] 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 Griffiths
<[EMAIL PROTECTED]> wrote:
>
> 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 [EMAIL PROTECTED]:~/
>
> 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.
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Deploying Rails" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---