Is it possible to read SMS via the command line over ssh?
Yes, you can read them out of the sqlite database with sql.
If it is possible to put an SMS client that works with the sqlite database on the computer with the ssh client, it should be possible to mount the directory containing the database with sshfs and read the SMS on the client computer.
For the benefit of other readers, can you exhibit a suitable SQL incantation?
Sure, here we go:
printf 'select time, body from messages\n' | sqlite3 ~/.purple/chatty/db/chatty-history.db
When I’m away from my Librem 5 and need to read an otp sms, I mosh in and:
Freeze chatty to prevent it handling the sms:
killall -STOP chatty
Login to a 2fa-enabled website or make creditcard payment which sends an otp sms:
mmcli -m 0 --messaging-list-sms
Read the newest message:
mmcli -m 0 --sms 0
killall -CONT chatty
How cool would a CLI or TUI SMS client be?
Although mosh looks pretty neat, I may investigate it.
I did some testing using
waypipe to let
chatty show its window on an ssh client. There are some obstacles - though: Chatty over waypipe ($1206) · Snippets · Snippets · GitLab