Module: Netconf::Junos::TransSSH
- Defined in:
- lib/net/netconf/jnpr/ssh.rb
Instance Method Summary collapse
-
#trans_on_connect_refused(start_args) ⇒ Object
this is used to handle the case where NETCONF (port 830) is disabled.
Instance Method Details
#trans_on_connect_refused(start_args) ⇒ Object
this is used to handle the case where NETCONF (port 830) is disabled. We can still access the NETCONF subsystem from the CLI using a hidden command ‘netconf’
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/net/netconf/jnpr/ssh.rb', line 13 def trans_on_connect_refused( start_args ) start_args[:port] = 22 @trans[:conn] = Net::SSH.start( @args[:target], @args[:username], start_args ) do_once = true @trans[:conn].exec( NETCONF_CLI ) do |chan, success| @trans[:chan] = chan do_once = false end @trans[:conn].loop { do_once } @trans[:chan] end |