On Sun, 2005-01-30 at 16:30, Jay Moore wrote: > I have some embedded boxes that I need to manage remotely. They don't > support ssh, only telnet is available. To address this security issue, > my plan was to co-locate a "real" computer with the embedded devices so > that I could ssh to the "real" computer, and then telnet from there over > the local network to the embedded boxes. > > The way that I want to set this up is to create user accounts on the > "real" computer that correspond to each of the embedded boxes. Then, > when I log in as that user I want my shell configured to start a telnet > session to the corresponding embedded box. > > To test this idea I created a simple script as follows. It starts the > telnet session, and gets me logged in - problem is that the script > completes, and then the telnet session is gone. What I need then is some > way to spawn an interactive shell from a shell script (I think). I've > read that the "expect" program will handle such things, but I really > prefer to do it using only the shell. > Actually why not put the following script on your "real" computer: #!/bin/bash telnet embedded_machine1 Then from your system you would run a command like this: ssh real_computer /pathtoscript/script_machine1 You will be prompted for the password on the real computer then it will run the script located on the real computer which starts the telnet session for you. Just setup different scripts for each embedded machine and call the appropriate script. -- Scot L. Harris webid@xxxxxxxxxx There but for the grace of God, goes God. -- Winston Churchill, speaking of Sir Stafford Cripps.