[ 0.590705] 00:08: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
The line above tell us that the kernel detected a 16550 UART chip in your PC, which provides a serial port (ttyS0), and there's some resources allocated to it (0x3f8 I/O address, IRQ 4).
The default permissions for serial devices are the following:
crw-rw---- 1 root dialout ... /dev/ttyS0
So, if you are a member of the dialout
group, you'll be able to access (read from/write to) the serial port devices. Add yourself to the dialout
group by running:
sudo adduser $USER dialout
Or:
sudo adduser <username> dialout
Then log out and log in again. Now you should have access to the serial port. Of course, you must also input the correct settings (speed, data bits, parity, stop bits, flow control) in the program you're using to access the device.
The output from dmesg
is not the result you want you still have to run the command:
setserial -g /dev/ttyS[0123456789]
The output would be like:
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x1020, IRQ: 18
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
....
/dev/ttyS7, UART: unknown, Port: 0x1020, IRQ: 18
/dev/ttyS8, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS9, UART: unknown, Port: 0x02e8, IRQ: 3
So as shown above The unkwon UART is not taken so you can use ttyS0 ot ttyS1.
Try this for your system and check.
More if you still use some old Ubuntu version < 14.04 you can use gtkterm
which is a simple GTK+ terminal used to communicate with the serial port.
sudo apt-get install gtkterm
Best Answer
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.