I have a Linux module.
I need to receive messages via SSH and transmit them using serial and vice versa.
Basically I want a pipe or a gateway between a SSH and Serial device.
Can anyone provide some guidance as to how it can be done.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
You can specify a command for ssh to run on the remote system by appending it to the end of the command line. If your 'print to serial' app/module takes input on stdin, you can simply do this:
ssh user@host "print_to_serial_command"
That will connect your ssh session to the stdin/stdout of the remote process, so you can pipe your input to the ssh command, use a here document, etc.