Executing commands on a Jailbroken iPhone (>iPhone 4), might suddenly fail and display killed:9 error. In that case, follow the below steps to resolve the problem.
Steps listed below explains how I fixed the Sqlite3 command killed: 9 error. The same technique works for other binaries and commands too.
1. Create a self signed code signing certificate.
On Mac OS X, go to Keychain Access -> Certificate Assistant -> Create a Certificate. It opens the certificate assistant window. Enter name (in my case it is securitylearn.net) and select certificate type as Code signing. Check let me override defaults option. Hit continue until it creates the certificate.
After creation of the certificate, the keychain looks as shown in the image below.
2. Connect to the iPhone over SSH using Cyberduck.
3. Copy the sqlite3 executable located at /usr/bin from the iPhone to Mac.
3. Open Mac terminal and run the below command to sign the sqilte3 with self signed certificate.
Codesign -fs securitylearn.net sqlite3
4. Replace the sqlite3 executable on the iPhone with newly signed sqlite3.
5. Now executing sqlite3 command works without any errors.