06-04-2013 02:19 AM
I've several changes I want to make across several ASR's, so I created a text file to paste into a series of routers from an SSH session, a technique I've used in IOS on many occasions.
But I find that when trying this on IOS-XR it wont accept the password sent to it from a text file
something like:
ssh 10.2.4.6
admin
cisco123
conf t
When I check the console I find its sat waiting for the password, if I paste it in the router ignores it.
I'm using secureCRT to paste in the notepad changes. Is there a way round this somehow?
06-04-2013 05:45 PM
That doesn't sound right, this should just work fine.
actual paste example from notepad:
RP/0/RSP0/CPU0:A9K-BNG(admin-config)#username test
RP/0/RSP0/CPU0:A9K-BNG(admin-config-un)#secret whatever
RP/0/RSP0/CPU0:A9K-BNG(admin-config-un)#group cisco-support
I am thinking there may be a CR/LF to CR conversion issue potentially in your terminal emulator?
Also if you paste it through console and you have an RSP440, you may not have hard configured the stop bits to 1
could that be it?
regards
xander
06-05-2013 12:54 AM
Hi xander,
Thanks for checking that, if I know it should work then next time I'm on site I will check the points you made, hopefully later this week.
Andy
06-11-2013 10:09 AM
Hi xander,
Am back on site this week, have tried this again today from an SSH session using secureCRT.
I ssh into the first router and authenticate at the cli, no problem
If I paste in the following to connect to another router:
ssh vrf MANAGEMENT 10.250.255.3
cisco123
I get:
ssh vrf MANAGEMENT 10.250.255.3
Password:
It just hangs, so I then press CR and get
%Permission denied
If I paste in the password it works fine!
Its not s show stopper, but would be good to get this working.
06-11-2013 01:31 PM
Hi Andy, ah yeah you cant do it like that... because the pasted password is not pasted into the next input.
You either need to script it differently via expect something like
send ssh
expect "Password"
send "cisco123"
something like that.
Or send the user/pass via teh ssh string something like you'd do with ftp: ssh user:cisco123@address
xander
06-12-2013 04:30 AM
Thanks I think I will have to resort to scripting as you say. I'm installing Prime NGN anyway, so when I get that working I should be able to do everything from there.
Andy
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide