I am trying my hands on shoes but got stuck. I am trying to connect to a remote computer using ssh and issue a command, got it working in cli but it is a no go for me to get it working on shoes. This might be a simple thing but new as I am I can't get past it. Here is what my code looks like atm
Shoes.setup do
gem 'net-ssh'
end
require "rubygems"
require "net/ssh"
Shoes.app do
button "Connect" do
append Net::SSH.start( '192.168.100.127', 'fox', :password => "xxxxxx" ) do
|ssh_connection|
ssh_connection.open_channel do |channel|
channel.on_data do |ch, data|
puts data
channel.exec "ls -la" do |ch, success|
para success
if success then
alert "uploaded"
else
alert "Fail"
end
end
end
end
end
end
end