4791 questions

5860 answers

9403 comments

5726 members

0 votes
125 views 8 comments
by
Hi

Would it be possible to access the serial port over ssh. like "ssh root@192.168.1.1 -p 6000"

Or access the serial port from the RUT955 cli after you have ssh to the rut955?

Kindly

Magnus

2 Answers

0 votes
by
Hi,

Serial devices can be controlled over IP if that's what you wish to do.

Please take a look at this wiki, it should answer most of your questions.

https://wiki.teltonika-networks.com/view/RUT955_RS232/RS485#Over_IP

EB.
by
Hi

That I have tried and it works, but I do not want to run it raw. I would like to access the serial port over ssh from my client.
Directly on a TCP port or first ssh to the cli and then a cli command to access the serial-port.

<<Magnus
by
Do you mean that you do not want to access it locally but through a remote?

EB.
0 votes
by

Yes, like this

Hugo-Pro:~ bergroth$ ssh 10.7.0.7 -l root
root@10.7.0.7's password:
BusyBox v1.30.1 () built-in shell (ash)
   ____        _    ___  ____

  |  _ \ _   _| |_ / _ \/ ___|
  | |_) | | | | __| | | \___ \
  |  _ <| |_| | |_| |_| |___) |
  |_| \_\\__,_|\__|\___/|____/
 ---------------------------------
   Teltonika RUT9 series 2020
 ---------------------------------

root@Teltonika-RUT955:~# connect /dev/rs232

Alternative like this

Hugo-Pro:~ bergroth$ ssh 10.7.0.7 -l root /usr/sbin/connect /dev/rs232
root@10.7.0.7's password:

Or if the a extra ssh daemon where running on an alternative port with the "/usr/sbin/connect" as shell

<<M

by
Well, Over IP will also work through remote if you will have a Public IP given by your operator. This way your client will be able to access RS232/485 devices without any issues.

EB.
by
Over IP is unencrypted and I would very much use ssh as transport for my console traffic. We will use the RUT955 as last resort console access to our of-location routers. Sure I can use openvpn to encrypt the traffic, but that is not what I'm looking for.

<<M
by

In this case, you will need a Talking and Listening software that will let you monitor serial port device.

E.g screen.

Please take a look at these pages:

https://openwrt.org/docs/techref/hardware/port.serial

https://docs.fedoraproject.org/en-US/Fedora/22/html/System_Administrators_Guide/sec-Using_screen_to_Connect_to_the_Serial_Console.html

by
I looked at the openwrt.org and they suggest to use "screen", "cu", "minicom" or kermit to access the serial port. But none of those applications seems to be available on RUT955 cli.
by

Use opkg update to update the list of available packages.

EB.

by

Sweet, that was what I was after:

opkg update
opkg install screen

root@Teltonika-RUT955:~# screen /dev/rs232
screen: can't load library 'libncurses.so.5'

ln -s /usr/lib/libncurses.so /usr/lib/libncurses.so.5

now I can do

ssh -t root@10.7.0.7 screen /dev/rs232 9600

and I get access to the serial port

Thanks!