Skip to content

Instantly share code, notes, and snippets.

@tatsuru
Created September 26, 2012 07:55
Show Gist options
  • Save tatsuru/3786678 to your computer and use it in GitHub Desktop.
Save tatsuru/3786678 to your computer and use it in GitHub Desktop.
Net::SSH.start(
ip_address, "wtatsuru"
) do |session|
session.open_channel do |channel|
channel.request_pty do |ch, success|
raise "pty" unless success
end
channel.exec("sync") do |ch, success|
ch.on_data do |c, data| puts data end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment