Closed sgalliani-efs closed 4 years ago
Well egg on my face, the solution was in front of my face, i didn't put the right lines in my oneos.rb profile so it would work with telnet :
class OneOS < Oxidized::Model
# prompt /^([\w.@()-]+#\s?)$/
# prompt /^([\w.@-]+[#>]\s?)$/
# prompt /^([\w.@()-]+[#>]\s?)$/
# prompt /^([\w.@-]+[#>]\s?)$/
# prompt /^([\w.@-]+[#>]\s?)$/
prompt /^([\w.@()-]+[#>]\s?)$/
comment '! '
cmd "show running-config\r" do |cfg|
cfg = cfg.each_line.to_a[0..-1].join
cfg.gsub! /^Building configuration...\s*[^\n]*\n/, ''
cfg.gsub! /^Current configuration :\s*[^\n]*\n/, ''
cfg
end
cfg :telnet do
username /^Username:/
password /^Password:/
end
cfg :telnet, :ssh do
# preferred way to handle additional passwords
if vars :enable
post_login do
send "enable"
cmd vars(:enable)
end
end
post_login "term len 0\r"
pre_logout "exit\r"
end
Hello,
I've been trying to backup our internet provides routeurs from the company Orange which are Oneaccess but it's been painfull and a bunch of issues keep happening.
I had no problem with cisco equipements that use ssh but for some reason the telnet on the oneos keep failing nonstop, i've tried chaging the oneos.rb file and checked my config file but nothin seems to help.
I know telnet works towards this equipement cause i can manually connect to them in cli.
Here is my config file :
and here is the oneos.rb :
and these are the type of errors i keep getting :
If anyone would have any idea why it keeps failing so much and why can't oxidized establish a telnet connection to my equipements,
thanks,
Stef