This proof of concept is a serial-to-ethernet converter. It uses one IP-address per serial port, not an IP port.
IP address | IP Port | serial connection |
---|---|---|
192.168.100.101 | 22 | ntp2 server |
192.168.100.102 | 22 | kvm host |
192.168.100.103 | 22 | nas |
DEVICE="eth0:0" BOOTPROTO="none" ONBOOT="yes" IPADDR="192.168.100.101" NETMASK="255.255.255.0"
DEVICE="eth0:0" BOOTPROTO="none" ONBOOT="yes" IPADDR="192.168.100.102" NETMASK="255.255.255.0"
DEVICE="eth0:0" BOOTPROTO="none" ONBOOT="yes" IPADDR="192.168.100.103" NETMASK="255.255.255.0"
service network restart
yum install dropbear
chkconfig dropbear off
/usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key /usr/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key /usr/bin/dropbearkey -t ecdsa -f /etc/dropbear/dropbear_ecdsa_host_key
ListenAddress 192.168.100.99
service sshd restart
yum install minicom
pu port /dev/ttyUSB0 pu minit pu mreset pu mhangup
pu port /dev/ttyUSB1 pu minit pu mreset pu mhangup
pu port /dev/ttyUSB2 pu minit pu mreset pu mhangup
#!/bin/bash #disable ctrl-c ctrl-z trap '' 2 20 connectto=`echo $SSH_CONNECTION | cut -d " " -f3` case $connectto in 192.168.42.27) /usr/bin/minicom ntp2 ;; 192.168.42.28) echo "naar 28" ;; *) echo "Connection problem to $connectto" exit 1 ;; esac
chmod +x /usr/local/bin/serial.sh
useradd -G dialout -s /usr/local/bin/serial.sh serial
passwd serial
You can also start a separate dropbear process per IP address.
/usr/sbin/dropbear -g -p 192.168.100.101:22 -p 192.168.100.102:22 -p 192.168.100.103:22