git clone https://github.com/npat-efault/picocom; cd picocom && make
Optional: Manually install in path as above makefile does not have an install rule
- make sure port 22 is uncommented & add your new custom port
Port 22 Port 3001
- Now force a command this port
Match LocalPort 3001 ForceCommand /bin/picocom -b115200 /dev/ttyS8
create a connection script, not sure if there is a proper place for it, I dropped ine in /etc/kermit/S0.ini
run bash -c '[[ $(lsof -t /dev/ttyS0) =~ .* ]] && kill -9 ${BASH_REMATCH[0]}'
set line /dev/ttyS0
set baud 115200
set handshake none
set carrier-watch off
set flow-control none
connect
exit
and the sshd_config to match
Match LocalPort 3001
ForceCommand /usr/bin/kermit /etc/kermit/S0.ini
Credits: