From: born in USSR Date: 2009-09-10T10:46:06+09:00 Subject: Net::Telnet login() intercept authentication error CODE: >user_login='user1' >user_paswd='xxxxxx' >... >tserv = Net::Telnet::new("Host" => "192.168.1.5", >"Timeout" => 1, "Prompt" => /[$%#>] \z/n) > > begin > ans=tserv.login(user_login,user_paswd) > rescue => err > puts err > end > >puts ans >... if user_login or user_paswd is wrong the application is hanging (don't know how it is on english, i mean that application stops). How can i intercept error. http://www.ruby-doc.org tells that 'The method returns all data received during the login process from the host, including the echoed username but not the password (which the host should not echo). If a block is passed in, this received data is also yielded to the block as it is received. ', but nothing about wrong authentication. -- Posted via http://www.ruby-forum.com/.