LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-26-2012, 10:48 PM   #1
hrfister
LQ Newbie
 
Registered: Jan 2008
Posts: 22

Rep: Reputation: 0
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
 
Old 02-27-2012, 02:29 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977
well you couldn't SSH to it without having a network link across it, which sounds like over kill to me. Additionally if that is a tcp/ip link, does that not make it implicitly "in band" again? do you get a serial device on the USB side? You'd want to start a tty (mgetty or agetty on centos I think) on ttyS0 or whatever device you get, and then use a console client, kermit for example, to connect.
 
Old 02-27-2012, 04:33 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 18,550

Rep: Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778
slip connection?
 
Old 02-27-2012, 11:42 PM   #4
hrfister
LQ Newbie
 
Registered: Jan 2008
Posts: 22

Original Poster
Rep: Reputation: 0
Wink

To acid_kewpie: When you ask "do you get a serial device on the USB side?" are you asking if there are serial ports on the centos and FreeBSD machines I want to access through my Access Server running Ubuntu. If so, I believe the answer is yes. The reason I am using an RS232 to USB cable is because I was thinking of using Ser2Net on the Ubuntu server...but from what I read about Ser2Net, I'd have to be doing it backwards, USB on my Ubuntu machine to the serial ports on the Centos and FreeBSD and then access the machines via telnet. I thought about going this route because the serial to usb cables is what I found in my supply bag. Otherwise, I'd be using a null modem cable. It looks like if I go this route, I will still have to follow your advise on starting a tty on both machines by their OS/Kernel rules. Let me play with it and if I have any more questions, I will ask. Either way I thank you for your response. I really appreciate your advise and input.

To jefro: Thank you for your response too. If I had the null modem cables, I'd use the SLIP protocol, but I don't have them. I am gonna try acid_kewpie's advise on starting tty on the machines' serial ports and reverse the connections of the RS232 to USB cable and see if I can use the Ser2Net daemon to allow me to telnet to each machine.

Succes or Fail, I'll let you felas know!
 
Old 03-02-2012, 02:05 PM   #5
hrfister
LQ Newbie
 
Registered: Jan 2008
Posts: 22

Original Poster
Rep: Reputation: 0
Still Trying...

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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial ports, USB-Serial adapters, and Linux Daravon Linux - Newbie 3 09-09-2010 06:53 AM
Serial input device using usb-serial connector slackiz Linux - Hardware 4 01-12-2009 05:04 AM
Using USB<->Serial and serial gender changer to transmit data between computers JoeyAdams Linux - Hardware 4 04-17-2008 05:15 AM
LXer: ssh on multiple servers Using cluster ssh LXer Syndicated Linux News 0 01-11-2008 03:40 PM
zoom external serial with usb to serial adapter foustware Linux - Hardware 1 12-07-2003 02:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration