Skip to main content

Accessing serial console over ssh-connection [Resolved]

We have a debian buster booting into multi-user.target (enabled via sudo systemctl set-default multi-user.target) and a USB serial adapter. Loggin in and accessing serial console via

sudo screen /dev/ttyUSB0 9600

for configuring Cisco Switch works fine.

However when I connect to this machine via ssh and then execute within the ssh session command from above it won't work. In putty as ssh client I see no output at all. I have to pull and reconnect serial USB adapter to make it usable again. Connecting with MobaXterm works only partly. Some inputs are completely ignored, outputs is often crippled like wrong position or even missing a lot characters. I've tried already minicom. Same behaviour. When connected via ssh you can't even quit it anymore. In screen CTRL+A and CTRL+D work at least.

What piece am I missing to access cisco serial console over ssh?

EDIT: Made some more tests: Tried to ssh from another Linux machine --> works With putty executing show run for getting the configuration and then hitting space key to see the next lines, it works a few times hitting space key, but still some lines are missing or at the wrong place. Then it hangs completely. Closing and re-opeing screen doesn't work.

Another point: Accessing a linux machine over MobaXTerm ssh and then connecting from there via ssh gives the same problematic behaviour. With crippled output it looks like

p
  power inline never
 speed 100
 duplex full                                                                                                                      arp  spanning-tge
 service-policy output Qos1234
!
interface GigabitEthernet1/10

Question Credit: Hannes
Question Reference
Asked July 21, 2019
Posted Under: Unix Linux
25 views
1 Answers

Finally I've tried some more and even with original Linux ssh Client connecting it got stuck. It took longer than accessing over ssh via windows, but finally same problems occured. Seems to be related to some kind of buffer or so. When it is really stuck you have to pull the USB-Serial-Converter and insert it back to get it working again.

However it perfectly works with tio http://tio.github.io/ Be sure to download the release tar.xz from there because that contains the needed ./configure file, whereas with git clone https://github.com/tio/tio this file is missing

Connecting to configure Cisco-Switch is

tio -b 9600 /dev/ttyUSB0

To do it without root rights: Execute once and then logoff and login again to apply the changes

sudo usermod -a -G dialout <yourUsername>

credit: Hannes
Answered July 21, 2019
Your Answer
D:\Adnan\Candoerz\CandoProject\vQA