1

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
7
  • What is a “multiuser.target”? Jul 17, 2019 at 11:23
  • It means no graphical screen, enabled with sudo systemctl set-default multi-user.target I've edited the post to clarify
    – Hannes
    Jul 17, 2019 at 11:24
  • Note you don't have to be root to access the serial port. If you ask another question about this, include the output of ls -ld /dev/ttyUSB0 Jul 17, 2019 at 11:25
  • Without root rights screen closes immediately
    – Hannes
    Jul 17, 2019 at 11:26
  • That is because you don't have permission to access the file. However using root is over the top, and can open you up to security problems. You can set the permissions of the port, or give your user extra permission (probably add to dialout group) Jul 17, 2019 at 11:28

1 Answer 1

0

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>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .