Sha256: 4f06941e0ce2868a4c1ebfdd7d34eac0b7186f9011a472b9d1a2903c3ec72776

Contents?: true

Size: 1.11 KB

Versions: 2

Compression:

Stored size: 1.11 KB

Contents

#!/usr/bin/ruby

$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')

require 'session'
require 'net/ssh'
require 'rye'
require 'yaml'
require 'stringio'

#p Rye.command('ssh', '-i', '', '')

module Rye::Box::Commands
  def rudy(*args); command("/proj/git/rudy/bin/rudy", args);  end
end

logger = StringIO.new
rbox = Rye::Box.new('localhost', 'delano', :stderr => logger).connect
#rbox2 = Rye::Box.new('ec2-174-129-173-3.compute-1.amazonaws.com', 'root')
#rbox.add_keys('/Users/delano/Projects/git/rudy/.rudy/key-test-app')
#rbox.connect
#puts rbox.date
#puts rbox.pwd
puts rbox['/usr/bin'].pwd
puts rbox.uptime
puts rbox.can
puts rbox.echo '$HOME'
puts rbox.rudy('myaddress')
rbox.disconnect
#puts logger.read
#>> 

__END__


rgroup = Rye::Group.new('root', 'keydir/file')
rgroup.add_hosts('ec2-174-129-173-3.compute-1.amazonaws.com')
rgroup.command('hostname')



#shell = Session::Shell.new 

#p shell.execute('ssh -T -t -i /Users/delano/Projects/git/rudy/.rudy/key-test-app.private root@ec2-174-129-82-193.compute-1.amazonaws.com')

#Net::SSH.configuration_for(localhost, ssh_options.fetch(:config, true)).merge(ssh_options)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solutious-rudy-0.5.1 tryouts/session_tryout.rb
solutious-rudy-0.9.0 tryouts/misc/session_tryout.rb