I have connected to my Ubuntu box using its serial port on windows(using putty connection is working fine.)
According to the question https://serverfault.com/questions/892892/how-to-use-ssh-over-serial-without-using-pppd-or-how-to-transfer-tcp-over-ser, it appears I should be able to SSH into the machine over a serial port.
What packages are needed or alternatively how do I set this up?
http://patrickst.blogspot.com/2011/11/tcpip-over-slip-on-gnulinux-ubuntu.html
https://learn.adafruit.com/welcome-to-circuitpython/advanced-serial-console-on-mac-and-linux
SSH is meant to accept (secure) connections over TCP/IP. To use SSH over a serial port, you'd need something acting as a TCP client and "forwarding" data from/to the serial port, such as
socat
.This (source) should be enough, assuming
/dev/ttyS1
is your serial port,115200
is the desired baud rate ("Speed" when using PuTTY for Serial connection) and you havesshd
listening on port22
(which is the default):-d -d
, according to the manual:I have not tested this, as I do not have a serial port at the moment.
If you just need login and run shell commands over the serial port, you can run
getty
,agetty
or evenscreen
on a serial port. The SerialConsoleHowto guide is outdated, but this answer might help.Okay, why do you need ssh, when you are on the shell in the serial port? Normally, you use the serial port, because, you want to see the device output and access its shell, and you use ssh when the machine is far, far away from you physically. If you still want, please go ahead and connect a RJ45 cable from the device to the computer where SSH is installed. I am assuming, you have set up proper IP networking and installed SSH server. Because, SSH works over the TCP on port 22. And in doing so, you are going to miss some serial output, because, SSH (Secure Shell) only gives you a sell. Use both and know the difference. Hope that helps!