DannyBen/jossh

View on GitHub
examples/b-without-hostfile.rb

Summary

Maintainability
A
0 mins
Test Coverage
#!/usr/bin/env ruby

# This example avoids using any external file for defining the host.
# See the previous example for comparison.

require 'jossh'

localhost = {
  host:     'localhost',
  user:     'vagrant',
  # password: 'SECRET',     # if needed
  # passphrase: 'SECRET',   # if needed
  # forward_agent: true,    # if needed
}

ssh! localhost, ["echo '-> Showing files'", "ls"]