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.

  • use ssh tunnel. – Ipor Sircer Nov 3 '16 at 13:00
  • 1
    What is a "Linux module"? Do you have a consistent device name? What have you tried so far? What didn't work? You might start by looking at minicom or setserial and raw device access. – symcbean Nov 3 '16 at 13:03
  • I am using the the Synapse E10. I have been able to establish a ssh connection to a remote host. I now just want help to forward the messages from remote host to a client on the serial port of E10. – Danush Tr Nov 7 '16 at 16:00

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.