I love net/ssh library

H

haws

I just wish i had discovered this earlier - i can automate so much
stuff now :D

# Syncronize my winxp clock with server's
require 'rubygems'
require 'net/ssh'

Net::SSH.start( 'servidor', 'hugo' ) do |session|
input, output, error = session.process.popen3( "date +%H:%M:%S" )
exec "time " + output.read
end
 
H

Hemant Kumar

I just wish i had discovered this earlier - i can automate so much
stuff now :D

# Syncronize my winxp clock with server's
require 'rubygems'
require 'net/ssh'

Net::SSH.start( 'servidor', 'hugo' ) do |session|
input, output, error = session.process.popen3( "date +%H:%M:%S" )
exec "time " + output.read
end

Read Capistrano code for hackery on this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,230
Messages
2,571,161
Members
47,794
Latest member
LucretiaEl

Latest Threads

Top