From: Valerio Schiavoni Date: 2008-02-19T22:15:02+09:00 Subject: Using net:ssh 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