Hi Jamis,
Thanks for the reply.
Knowing where the equivalent in windows of ~.ssh/known_hosts is the
core of the problem.
When that snippet of code does
e.remember_host!
where the hell is it remembering it to? Thats the question that I have
not been able to figure out the answer to.
Putty stores all that stuff in registry .. but putty is working.
Winscp holds it in an ini file I think.
Where is Net::SSH storing it on WIndows thats the problem.
The ssh_options[:paranoid] = false option did not work for me ..
perhaps because I have password authentication disabled on the linux
deploy to box and the paranoid option seems to make it just give up on
keys so I get prompted for a password and then it fails.
I can now deploy again after running that code but it makes me very
nervous of doing anything with the keys!
Cheers
George
On Jun 30, 1:29 am, Jamis Buck <[EMAIL PROTECTED]> wrote:
> The old key was being put in the ~/.ssh/known_hosts directory, where
> "~" is the path to your home directory. Where that directory is on
> Windows, I wouldn't know, but if you can find it, then you should be
> able to just open the known_hosts file, delete the line for the server
> in question, and proceed.
>
> Alternatively (and less securely), you can set this in your deploy.rb:
>
> ssh_options[:paranoid] = false
>
> That'll make it ignore host key mismatches. Not recommended, but some
> folks just like simple solutions.
>
> - Jamis
>
> On Jun 29, 2008, at 4:14 AM, giorgio wrote:
>
>
>
> > After reading the entire contents of google I stumbled across this
> > snippet of code which I ran and it fixed my problem.
>
> > So here it is for other people who may hit the same problem:
>
> > require 'rubygems'
> > require 'net/ssh'
> > include Net
> > domain = 'your_server_domain_as_in_deploy.rb' # insert IP address or
> > domain name here
> > begin
> > Net::SSH.start(domain, 'your_deploy_user_as_in_deploy.rb') do |ssh|
> > # ...
> > end
> > rescue Net::SSH::HostKeyMismatch => e
> > puts "remembering new key: #{e.fingerprint}"
> > e.remember_host!
> > retry
> > end
>
> > Cheers
> > George
>
> > PS. It would be great if Capistrano could give you the message about
> > server key changing the same as putty etc....
>
> > On Jun 29, 3:59 pm, giorgio <[EMAIL PROTECTED]> wrote:
> >> Hi,
>
> >> I have seen previous posts about this key mismatch problem but I am
> >> still getting it.
>
> >> I am trying to do a cap deploy:setup
>
> >> I have had it working on other apps for some time.
>
> >> I upgraded ssh on the box I am deploying to ubuntu 7.1
>
> >> I had to regenerate the server keys as they were blacklisted due to
> >> ssh defects in Debian systems.
>
> >> After that I connected from Win XP laptop using putty and got the
> >> dialog asking me if I wanted to except the different key. I said yes
> >> and it was fine.
>
> >> Likewise for WinScp.
>
> >> But with Capistrano I get:
> >> connection failed for: george-ubuntu (Net::SSH::HostKeyMismatch:
> >> fingerprint 05:80:21:fe:d1:66:00:b2:80:79:c9:4f:ff:04:7
> >> 8:56 does not match for "george-ubuntu,192.168.2.4")
>
> >> I have tried ssh_options[:paranoid] = false but then I get prompted
> >> for a password rather than using the key.
>
> >> Where is Capostrano getting the old server key from?
> >> Presumably if I new that I could clear the old key...
>
> >> Thanks for any help.. I cant deploy anything with Capistrano now!
>
> >> George
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---