03-13-2007 07:41 AM
Is there a way to execute commands on a cisco device by giving only one ssh command from a computer?
03-13-2007 09:11 AM
Hi,
Can you please explain to me what you are trying to do.
Normally SSH is used to get management access to the device.
Do you want to do something after that?
Thanks
Gilbert
03-14-2007 08:12 AM
Yes. I want to be able to execute commands on the device from the computer by only having to type one command. I dont want to have to login and then configure the device.
For instance:
ssh -l
at the computer would connect to the device, ask for the password and execute the command all in that one command. However I can only get it to take one command. Is there a way to like run a list of commands you want to execute on the device? Or is there something else I could do to automate the ssh session?
03-13-2007 11:42 AM
First your router should support ssh function. For this make sure you IOS shows a k9 in it. Or else download a suitable one.
Then generate the crypto rsa keys on the router/device. crypto key generate rsa. Specify if neccessary the ip ssh authentication retries and timeout seconds.
Leter download a software like putty or secure crt to connect to these devices from your PC.
HTH
Hoogen
03-14-2007 08:21 AM
This is for any cisco device not routers in particular. Also I know how to setup and use ssh but I want a way to automate it. Like i mentioned in the other reply above
03-14-2007 08:39 AM
Hi Matthew,
I understand what you are saying - To be honest with you, I do not know if an SSH single line entry is there to automate such a process you are requesting...
But there is an option in IOS called as "Embedded Event Manager" (EEM) -
Please take a look at it. See if this is something that would help you out.
Cheers
Gilbert
Note: I had never used it before but playing around with it might help or atleast give you an idea. Sorry for not giving you a direct answer.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: