From: KING SABRI Date: 2011-10-26T21:35:04+09:00 Subject: Re: How to SSH interactive Session Thanks Brian,, "Net::SSH::Telnet" is has an advantage which it's keeping the session open until finish all commands not like "Net::SSH" which is create a session for each command/communication. However, it doenst solve my issue ------------------------------------------------------------ require 'net/ssh/telnet' host = "127.0.0.1" port = 15000 # SSH port user = 'userName' # username pass = "password" # password s = Net::SSH::Telnet.new("Host" => host, "Username" => user, "Password" => pass) puts s.cmd("pwd") puts s.cmd "sudo passwd userName" ------------------------------------------------------------ that's my code :( -- Posted via http://www.ruby-forum.com/.