--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: recvdata
comment: 
- !ruby/struct:SM::Flow::P 
  body: Login to the host with a given username and password.
- !ruby/struct:SM::Flow::P 
  body: The username and password can either be provided as two string arguments in that order, or as a hash with keys &quot;Name&quot; and &quot;Password&quot;.
- !ruby/struct:SM::Flow::P 
  body: This method looks for the strings &quot;login&quot; and &quot;Password&quot; from the host to determine when to send the username and password. If the login sequence does not follow this pattern (for instance, you are connecting to a service other than telnet), you will need to handle login yourself.
- !ruby/struct:SM::Flow::P 
  body: The password can be omitted, either by only provided one String argument, which will be used as the username, or by providing a has that has no &quot;Password&quot; key. In this case, the method will not look for the &quot;Password:&quot; prompt; if it is sent, it will have to be dealt with by later calls.
- !ruby/struct:SM::Flow::P 
  body: 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.
full_name: Net::Telnet#login
is_singleton: false
name: login
params: (options, password = nil) {|recvdata| ...}
visibility: public
