I want to redirect my serial port while telnet session in linux.
I have an embedded Linux box which is has a serial console. After I do a telnet to the box, I can type in both the serial console as well as the telnet console. I want to stop the serial console access or redirect it to something else. After I exit from the telnet console, I should be able to access the serial console again. Can any one suggest, please?
I have planned to put
cat /dev/console > /dev/ttyp0 when telnet session starts. It solves the problem of not accessing the serial console when telnet session console is open, but when I exit from the telnet console and type something on the serial console, for the shell command
-/bin/sh: command not found (Shell not running perhaps?).