Sha256: 1d92b31231abd5adfee2c388b37e99b693980f93c09a199398251c628731aaad

Contents?: true

Size: 1.92 KB

Versions: 63

Compression:

Stored size: 1.92 KB

Contents

By default Beaker connects to hosts using public key authentication, but that may not be correct method for your particular testing set up.  To have beaker connect to a host using a username/password combination edit your hosts configuration file.  You will need to create a new ssh hash to be used for logging into your SUT that includes (at least) entries for _user_, _password_, and _auth_method_.  You may also include any additional supported [Net::SSH Options](http://net-ssh.github.io/ssh/v1/chapter-2.html#s3).

## Example 1: Use 'password' authentication
```
HOSTS:
  pe-centos6:
    roles:
      - master
      - agent
      - dashboard
      - database
      - myrole
    platform: el-6-i386
    snapshot : clean-w-keys
    hypervisor : fusion
    ssh:
      password : anode
      user: anode
      auth_methods:
        - password
```

The log will then read as:

_snip_
```
pe-centos6 20:19:16$ echo hello!
Attempting ssh connection to pe-centos6, user: anode, opts: {:config=>false, :paranoid=>false, :timeout=>300, :auth_methods=>["password"], :port=>22, :forward_agent=>true, :keys=>["/Users/anode/.ssh/id_rsa"], :user_known_hosts_file=>"/Users/anode/.ssh/known_hosts", :password=>"anode", :user=>"anode"}
```
_/snip_

## Example 2: Use a list of authentication methods
If you want to try a sequence of authentication techniques that fall through on failure simply include them (in their desired order) in your list of _auth_methods_.  If one of your methods is user/password be warned, after a failure Net::SSH will attempt keyboard-interactive password entry - if you do not want this behavior add _number_of_password_prompts: 0_.
```
HOSTS:
  pe-centos6:
    roles:
      - master
      - agent
      - dashboard
      - database
      - myrole
    platform: el-6-i386
    snapshot : clean-w-keys
    hypervisor : fusion
CONFIG:
  ssh:
    auth_methods:
      - password
      - publickey
    number_of_password_prompts: 0
    password : wootwoot
```

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
beaker-3.30.0 docs/how_to/use_user_password_authentication.md
beaker-3.29.0 docs/how_to/use_user_password_authentication.md
beaker-3.28.0 docs/how_to/use_user_password_authentication.md
beaker-3.27.0 docs/how_to/use_user_password_authentication.md
beaker-3.26.0 docs/how_to/use_user_password_authentication.md
beaker-3.25.0 docs/how_to/use_user_password_authentication.md
beaker-3.24.0 docs/how_to/use_user_password_authentication.md
beaker-3.23.0 docs/how_to/use_user_password_authentication.md
beaker-3.22.0 docs/how_to/use_user_password_authentication.md
beaker-3.21.1 docs/how_to/use_user_password_authentication.md
beaker-3.21.0 docs/how_to/use_user_password_authentication.md
beaker-3.20.0 docs/how_to/use_user_password_authentication.md
beaker-3.19.0 docs/how_to/use_user_password_authentication.md
beaker-3.18.0 docs/how_to/use_user_password_authentication.md
beaker-3.17.0 docs/how_to/use_user_password_authentication.md
beaker-3.16.0 docs/how_to/use_user_password_authentication.md
beaker-3.15.0 docs/how_to/use_user_password_authentication.md
beaker-3.14.0 docs/how_to/use_user_password_authentication.md
beaker-3.13.0 docs/how_to/use_user_password_authentication.md
beaker-3.12.0 docs/how_to/use_user_password_authentication.md