Created
March 6, 2023 13:41
-
-
Save CodyKochmann/620f7e642e69a8fdd9877de452b3038b to your computer and use it in GitHub Desktop.
dedicated db user that has a login shell of sqlite for a sqlite over ssh interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ ~ ssh [email protected] cat /usr/local/bin/sqlite3-user-db | |
[email protected]'s password: | |
#!/bin/bash | |
/usr/bin/sqlite3 "$HOME/$USER.db" | |
➜ ~ ssh [email protected] | |
[email protected]'s password: | |
Linux kali 6.0.0-kali3-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.0.7-1kali1 (2022-11-07) x86_64 | |
The programs included with the Kali GNU/Linux system are free software; | |
the exact distribution terms for each program are described in the | |
individual files in /usr/share/doc/*/copyright. | |
Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent | |
permitted by applicable law. | |
Last login: Mon Mar 6 13:33:20 2023 from 10.0.0.10 | |
SQLite version 3.39.4 2022-09-29 15:55:41 | |
Enter ".help" for usage hints. | |
sqlite> .tables | |
test1 | |
sqlite> .schema test1 | |
CREATE TABLE test1(id numeric unique not null); | |
sqlite> select count(id) from test1; | |
0 | |
sqlite> .exit | |
Connection to 10.0.0.8 closed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment