0003-Add-default-path-for-ssh-key.patch

Jean-Philippe Garcia Ballester, 04/17/2013 11:06 AM

Download (1.14 KB)

View differences:

src/cli/one_helper/oneuser_helper.rb
57 57
    def password(options)
58 58
        case options[:driver]
59 59
        when OpenNebula::User::SSH_AUTH
60
            if !options[:key]
61
                return -1, "You have to specify the --key option"
62
            end
63

  
64 60
            require 'opennebula/ssh_auth'
65 61

  
62
            options[:key]  ||= ENV['HOME']+'/.ssh/id_rsa'
63

  
66 64
            begin
67 65
                auth = OpenNebula::SshAuth.new(:private_key=>options[:key])
68 66
            rescue Exception => e
69
-