It's not much different than with Postgres:
ssh your-server sqlite3 /tmp/path/to/your/db.sqlite3
Or if you're using Kamal, then the choice of database is completely transparent: kamal app exec -i --reuse bin/rails console