0

Googleクラウドで(手動で)インスタンスをセットアップして作成し、(id_rsa.pubから)sshキーを追加したので、パスワードなしで、ユーザーをsudoerとして設定できます ssh username@x.x.x.x

私は、rubber.yml で「ジェネリック」プロバイダーをセットアップしました。

generic: key_file: "#{Dir[(File.expand_path('~') rescue '/root') + '/.ssh/id_rsa.pub'].first}"

私は deploy.rb に設定しました:

set :initial_ssh_user, 'ユーザー名'

今私がしようとしているときcap rubber:create_staging RAILS_ENV=staging、役割/ ipのいくつかの質問の後、ルートパスワードを求められます:

 ** Instance api-staging created: api-staging
Waiting for instances to start
 ** Instance running, fetching hostname/ip data
.Trying to enable root login
Password for username @ x.x.x.x: .
  * 2014-11-16 14:07:45 executing `rubber:_ensure_key_file_present'
  * 2014-11-16 14:07:45 executing `rubber:_allow_root_ssh'
  * executing "sudo -p 'sudo password: '  bash -l -c 'mkdir -p /root/.ssh && cp /home/username/.ssh/authorized_keys /root/.ssh/'"
    servers: ["x.x.x.x"]
 ** Can't connect as user cat.of.duty to x.x.x.x, assuming root allowed
  * 2014-11-16 14:07:46 executing `rubber:_direct_connection_x.x.x.x'
  * executing "echo"
    servers: ["x.x.x.x"]
.. ** Failed to connect to x.x.x.x, retrying

何度も何度も

4

0 に答える 0