Have many SG200 line switches in network and SSH requires username entry twice (bug Cisco is not planning to fix). Is there a way to edit the library or a code snippet to work around this to leverage netmiko for admin tasks?
ssh does not prompt for username (it uses user on shell or whatever is passed before @ or w/ -l flag), so I assume this is happening "after" the ssh session is "setup" basically?
I assume you are using the sg300 device type? If so you should be able to modify that to have a special_login_handler that operates similar to the WLC one as I think the WLC does this same thing (weird double credentials prompt thing).
Here is the WLC special login handler.
Here is where the special login handler is getting called in the normal establish connection process.
There is a way on the SG200 to disable that double prompting behavior.
I think it is this command:
ip ssh password-auth
You should configure that or you will need to do the special login handling that @carlmontanari mentioned which can get hard.
Carl,
Thanks for getting back to me. Yes, after SSH is established, and with the sg300 device type configured. I’ll give the WLC handler a try or the other option. Would be great if this did the trick. The SG line is very cost effective for access layer, but occasionally frustrates us like this.
I’ll let you know how this works.
Thx,
Greg
Gregory Powlin
Manager of Information Technology
County of Oswego
Public Safety Center
39 Churchill Road
Oswego, NY 13126
(315) 349-3525
greg.[email protected]greg.powlin@oswegocounty.com
From: Carl Montanari notifications@github.com
Sent: Thursday, October 31, 2019 11:11 AM
To: ktbyers/netmiko netmiko@noreply.github.com
Cc: Greg Powlin Greg.Powlin@OswegoCounty.com; Author author@noreply.github.com
Subject: Re: [ktbyers/netmiko] netmiko fails w/ Cisco SG200 line (#1440)
ssh does not prompt for username (it uses user on shell or whatever is passed before @ or w/ -l flag), so I assume this is happening "after" the ssh session is "setup" basically?
I assume you are using the sg300 device type? If so you should be able to modify that to have a special_login_handler that operates similar to the WLC one as I think the WLC does this same thing (weird double credentials prompt thing).
Herehttps://github.com/ktbyers/netmiko/blob/develop/netmiko/cisco/cisco_wlc_ssh.py#L12 is the WLC special login handler.
Herehttps://github.com/ktbyers/netmiko/blob/develop/netmiko/base_connection.py#L914 is where the special login handler is getting called in the normal establish connection process.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/ktbyers/netmiko/issues/1440?email_source=notifications&email_token=ANURH3WZ7WULAVNKPZ23CXLQRLYP7A5CNFSM4JHH7V3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECYEFZQ#issuecomment-548422374, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANURH3VJIBKAOGAFVXTCXOTQRLYP7ANCNFSM4JHH7V3A.
Reading emails staring with oldest. Will try this first. Thx, Greg
Gregory Powlin
Manager of Information Technology
County of Oswego
Public Safety Center
39 Churchill Road
Oswego, NY 13126
(315) 349-3525
greg.[email protected]greg.powlin@oswegocounty.com
From: Kirk Byers notifications@github.com
Sent: Thursday, October 31, 2019 11:48 AM
To: ktbyers/netmiko netmiko@noreply.github.com
Cc: Greg Powlin Greg.Powlin@OswegoCounty.com; Author author@noreply.github.com
Subject: Re: [ktbyers/netmiko] netmiko fails w/ Cisco SG200 line (#1440)
There is a way on the SG200 to disable that double prompting behavior.
I think it is this command:
ip ssh password-auth
You should configure that or you will need to do the special login handling that @carlmontanarihttps://github.com/carlmontanari mentioned which can get hard.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/ktbyers/netmiko/issues/1440?email_source=notifications&email_token=ANURH3Q6D2LK3WZETYY3VZ3QRL43JA5CNFSM4JHH7V3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECYIOIA#issuecomment-548439840, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANURH3VX6HNWSRUUU6RSXS3QRL43JANCNFSM4JHH7V3A.
Going to close this out, feel free to reopen if you're still having any issues.
Also, feel free to join the Pynet slack community here where you can find a dedicated netmiko channel for questions/comments/etc if you're still having any issues.
Most helpful comment
Reading emails staring with oldest. Will try this first. Thx, Greg
Gregory Powlin
Manager of Information Technology
County of Oswego
Public Safety Center
39 Churchill Road
Oswego, NY 13126
(315) 349-3525
greg.[email protected]greg.powlin@oswegocounty.com
From: Kirk Byers notifications@github.com
Sent: Thursday, October 31, 2019 11:48 AM
To: ktbyers/netmiko netmiko@noreply.github.com
Cc: Greg Powlin Greg.Powlin@OswegoCounty.com; Author author@noreply.github.com
Subject: Re: [ktbyers/netmiko] netmiko fails w/ Cisco SG200 line (#1440)
There is a way on the SG200 to disable that double prompting behavior.
I think it is this command:
ip ssh password-auth
You should configure that or you will need to do the special login handling that @carlmontanarihttps://github.com/carlmontanari mentioned which can get hard.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/ktbyers/netmiko/issues/1440?email_source=notifications&email_token=ANURH3Q6D2LK3WZETYY3VZ3QRL43JA5CNFSM4JHH7V3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECYIOIA#issuecomment-548439840, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANURH3VX6HNWSRUUU6RSXS3QRL43JANCNFSM4JHH7V3A.