Find the answer to your Linux question:
Results 1 to 4 of 4
I am trying to set up out of band access from an access server running Ubuntu to a FreeBSD server and a CentOS server. Does anyone know if there is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2011
    Location
    Houston, Texas, USA
    Posts
    9

    SSH to servers via Serial to USB


    I am trying to set up out of band access from an access server running Ubuntu to a FreeBSD server and a CentOS server. Does anyone know if there is a way to SSH from the Ubuntu server via its serial port to each machine's USB ports as follows:

    Ubuntu Serial Port->Serial-to-USB Cable->FreeBSD machine USB Port

    Ubuntu Serial Port->Serial-to-USB Cable->CentOS machine USB Port

    Any help would be greatly appreciated!

    -hrfister

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,444
    No need for ssh, as the connection is local by design and authentication is also given.
    While it may be possible to encrypt the serial communication, this would be a second step.

    Traditionally, you start a getty process to listen on a serial device.
    Thatīs it.
    On the CentOS/FreeBSD machines, add this and then tell init to reread its config: telinit -q
    Code:
    S1:2345:respawn:/sbin/agetty 9600 ttyS0 vt100
    ttyS0 is the serial device.

    If you then connect the CentOS/FreeBSD machines to the ubuntu box via a nullmodem cable each,
    you should be able to connect with a terminal application like minicom.
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Jul 2011
    Location
    Houston, Texas, USA
    Posts
    9

    Wink

    Quote Originally Posted by Irithori View Post
    No need for ssh, as the connection is local by design and authentication is also given.
    While it may be possible to encrypt the serial communication, this would be a second step.

    Traditionally, you start a getty process to listen on a serial device.
    Thatīs it.
    On the CentOS/FreeBSD machines, add this and then tell init to reread its config: telinit -q
    Code:
    S1:2345:respawn:/sbin/agetty 9600 ttyS0 vt100
    ttyS0 is the serial device.

    If you then connect the CentOS/FreeBSD machines to the ubuntu box via a nullmodem cable each,
    you should be able to connect with a terminal application like minicom.
    Irithori,
    Thank you so much for your response and advise.

    If I had the null modem cables, I'd use the SLIP protocol or your technique, but I don't have them. What I do have at my disposal at this time are the RS232 to USB cables. I was thinking of using Ser2Net but it seems that I will have to start tty on each machine,like you suggested, and reverse the connections. In other words connect two USB ports on the access server using Ubuntu and connect to the serial ports on each machine and see if I can use the Ser2Net daemon to allow me to telnet to each machine.

    Success or Fail, I will let you know. If I do need to do it with a null modem cable as you suggested, then I'd have to wait for my next paycheck.. Thanks again and I will surely let you know if I can get it to work with Ser2Net.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jul 2011
    Location
    Houston, Texas, USA
    Posts
    9
    Men,

    The following are the servers and the ports in question:
    --------------------------------------------------------------------------------
    Access Server: Ubuntu - the serial port where serial-to-USB is connected is ttyS5
    --------------------------------------------------------------------------------
    Target Server: Centos - the USB port where Serial-to-USB is connected is ttyUSB0

    When I unplugged the serial-to-USB cable, I got this entry in the dmesg output:
    usb 1-1: USB disconnect, address 14

    When connect it, I get this in the dmesg output:
    usb 1-1: pl2303 converter now attached to ttyUSB0

    --------------------------------------------------------------------------------

    **NOTE: I don't have a null modem cable, all I have at this time is a serial-to-usb cable.**

    I am trying to use ser2net. The configuration, /etc/ser2net.conf file has the following:

    2000:telnet:600:/dev/ttyS5:115200 8DATABITS NONE 1STOPBIT banner

    According to the documentation, it is supposed to allow me to start a session on the Target Server from the Access Server the following

    way:

    //this is on the Access Server:
    #telnet localhost 2000

    Trying ::1...
    Trying 127.0.0.1...
    Trying 127.0.0.1...
    telnet: Unable to connect to remote host: Connection refused


    I already checked the firewall settings on the Target Server and made sure the telnet service was working. I tested this by initiating a regular telnet session from the Access Server's telnet client to the target server's telnet service. It works with no problems.

    Am I supposed to somehow make sure that the telnet service on the Target Server is listening on the USB port of ttyUSB0? Should I spawn ttyUSB0 to allow a remote telnet login or something similar? Please advise.

    Thanks in advance!

    -hrfister

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •