From: born in USSR Date: 2009-09-10T01:14:24+09:00 Subject: Net::Telnet can't send password message [code] require "net/telnet" user_login='user1' user_paswd='xxxxxx' ssh_host='192.168.1.2' tserv = Net::Telnet::new("Host" => "192.168.1.5", "Timeout" => 10, "Prompt" => /[$%#>] \z/n) ans=tserv.login(user_login,user_paswd) # Successful authentication tserv.cmd('ssh -l #{user_login} #{ssh_host}')do |c| # on the screen: puts c.to_s # ssh -l user1 192.168.1.2 end # user1@192.168.1.2's password: tserv.close [/code] i also tried [code] ... tserv.puts('ssh -l #{user_login} #{ssh_host}') puts tserv.gets # assumed that on screen i'll see # 'user1@192.168.1.2's password:' # but there were was nothing tserv.puts user_paswd ... [/code] but it doesn't work too. how can i input password for ssh? -- Posted via http://www.ruby-forum.com/.