V
Valerio Schiavoni
Hello,
what I want to do is the following:
- ssh into a remote machine (let's call it 'frontend')
- from the front-end, ssh into another machine (call it node-A)
So far, i was only able to perform the first step:
require 'rubygems'
require 'net/ssh'
def do_run_introducer(session)
session.open_channel do |channel|
channel.on_data do |ch, data|
puts data
end
channel.exec "ls" #to verify that i'm actually logged in..
end
end
Net::SSH.start( 'remote-machine-address', my-user-name' ) do |
session|
do_run_introducer session
#do_run_peers session
session.loop
end
Any help is very appreciated
what I want to do is the following:
- ssh into a remote machine (let's call it 'frontend')
- from the front-end, ssh into another machine (call it node-A)
So far, i was only able to perform the first step:
require 'rubygems'
require 'net/ssh'
def do_run_introducer(session)
session.open_channel do |channel|
channel.on_data do |ch, data|
puts data
end
channel.exec "ls" #to verify that i'm actually logged in..
end
end
Net::SSH.start( 'remote-machine-address', my-user-name' ) do |
session|
do_run_introducer session
#do_run_peers session
session.loop
end
Any help is very appreciated