I'm in an environment with authentication tokens, so typically a SSH password is not required. My serverspec tests are always asking me for a password. Is there a way to prevent this?
No password required:
$ ssh atlspf01 [email protected]:~$
Yet, in serverspec
$ rake spec Password:
Relevant code in spec_helper.rb
require 'serverspec' require 'net/ssh' set :backend, :ssh ... set :host, ENV['TARGET_HOST'] set :ssh_options, :user => ENV['USERNAME']
UPDATE: Problem is that net::ssh does not support Kerberos authentication (gssapi-with-mic). Use ssh::ssh::kerberos or use ssh keys.