From: Athreya Vc Date: 2010-12-24T00:20:08+09:00 Subject: Re: 'net/ssh' error /usr/lib/ruby/gems/1.8/gems/net-ssh-2.0.23/lib/net/ssh/transport/session.rb:65:i Yes sir, I did that too. Immediately it threw an error saying constant can't be changed. Thanks for the suggestion. The script is working great and I am happy. Regards, Athreya unknown wrote in post #970299: > On Thu, Dec 23, 2010 at 4:00 AM, Athreya Vc > wrote: >> I am so sorry, >> >> It was the new line character that was creating problems. >> >> Fixed it > > No need to apologize. Welcome to the community. :-) > >> SERVER_LIST.each do |server| >> SERVER=server.chomp >> Net::SSH.start(SERVER, USER, :password=>PASSWORD) do > > Stylistically, rather than using SERVER as a variable (uppercase > indicates a constant), so I would do something like: > > A) s = server.chomp; Net::SSH.start(s, ... > B) server = server.chomp; Net::SSH.start(server, ... > C) Net::SSH.start(server.chomp, ... > D) current_host = server.chomp; ... -- Posted via http://www.ruby-forum.com/.