Is reading SMS via ssh possible?

Is it possible to read SMS via the command line over ssh?

2 Likes

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
7 Likes

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

Unfreeze chatty:

killall -CONT chatty
3 Likes

How cool would a CLI or TUI SMS client be?

Although mosh looks pretty neat, I may investigate it.

1 Like

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

1 Like