Question : Problem: How to configure non-interactive (batch) access to Cisco router via SSH

Hi all.
For my management stuff I'm used to write scripts which execute remote command on a Cisco router by mean of the good-old "rsh" utility. The Cisco configuration is straightforward and well documnted (ip rcmd-enable / ip rcmd remote-host ... etc.), I have NO problems in running this way.
For security reasons I want to switch from "rsh" to "ssh" in order to execute commands ove a "secure" connection.
I already have SSH properly configured on my Cisco device and CAN login into the router via my ssh client (OpenSSH / Linux) in INTERACTIVE mode.
What I would like to do, now, is the ability to execute commands on the router in NON-INTERACTIVE (batch) mode, that is, with automatic (possibly rsa-based) authentication. I already use this mode to run commands on remote Linux servers: it simply requires to add the public key of the "client user" on the "server" (that is: the "accepting" machine) and to properly configure the related stuff, in order to have an automatically-autenticated ssh session with the ability to send arbitrary commands to the remote system.
After carefully reading all the docs/manuals available I was not able to correctly setup such scenario on my cisco device: when trying to connect to the router, it always asks for a password to be typed at the client console and this prohibits a non-interactive command execution.
Can you give me some hints?
Hope the question is clear.
-- rock

Answer : Problem: How to configure non-interactive (batch) access to Cisco router via SSH

Thank you all.
Actually I already implemented a TCL/expect-based script dialogue, that is, a solution similar to what was suggested by arnold & cflong. I was just wondering if it would be possible to completely automatize the SSH authentication without "simulated interactive" session as, apart of cultural curiosity, it would prove useful to issue a single IOS command to the router. As already said in my original question, I know how to do it between Linux/unix boxes (thank you anyway, simply_dhval).
I will leave the question open but I'm starting to believe that it is, simply, not supported by IOS.
Random Solutions  
 
programming4us programming4us