Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS: Fails to recognized User Name: and Password prompt on Cisco SG300-52 #40

Closed
thetamind opened this issue Aug 14, 2014 · 1 comment · Fixed by #44
Closed

IOS: Fails to recognized User Name: and Password prompt on Cisco SG300-52 #40

thetamind opened this issue Aug 14, 2014 · 1 comment · Fixed by #44

Comments

@thetamind
Copy link

Oxidized fails to authenticate using Telnet or SSH connection with IOS model on Cisco SG300-52.

#show version
SW version    1.3.7.18 ( date  12-Jan-2014 time  18:02:59 )
Boot version    1.3.5.06 ( date  21-Jul-2013 time  15:12:10 )
HW version    V02

Manually connecting looks like:

$ ssh 192.168.0.253




User Name:admin
Password:******************************

Using Oxidized, debugging @output in the expect method shows:

"\r\n\r\r\n\r\n\r\nUser Name:"
"admin\r\n\rPassword:"

Yes, there is a mismatched \r in there. It appears the first instance of a line ending is \r\n\r.

@ytti
Copy link
Owner

ytti commented Aug 15, 2014

Oh these are one of those dodgy boxes where SSH is without authentication. Aireos model is the same (ssh lets in every user, without password and authentication is handled outside ssh)
Essentially you need to create new model, as this is new OS.

You could get stared like this

mkdir ~/.config/oxidized/model
cat > ~/.config/oxidized/model/operatingsystemname.rb
class OperatingSystemName < Model
comment '! '
prompt /regexp/

cmd 'show running-config' do |cfg|
cfg
end

cfg :telnet, :ssh do
username /^User Name:\s_/
password /^\r?Password:\s_/
end
end

Then set your model type as operatingsystemname and it should try to use this model.

You can also debug output from ssh/telnet via config
input:
debug: debug-session-file.txt

(You'll need version from github for that).

If you can give remote access to device, I can write the model for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants