Tutorial How to install .deb via SSH after compile (macOS/Linux)

AndnixSH

PMT Elite Modder
Original poster
Staff member
Modding-Team
Jun 27, 2017
4,762
301,733
1,213
Modding World
It is simple with just 'make package install'. I'm using macOS in Vmware to do this and it works great, it can connect to my real local IP even the virtual network is isolated. This will work with any Linux systems

The first step is make sure to set your IP address of your jailbroken device in your Makefile
Code:
THEOS_DEVICE_IP = 192.168.87.119
then run
Code:
make package install
This will compile your tweak, create a deb package file and install it via ssh

For the first time, you will be prompted to save your fingerprint to your device

Type yes and type your SSH password if your jailbroken device (Default is alpine)

Image 1615739141.png


That's all

But you are not done yet, installing will always prompt you to type password again

So how to save password permanently? You don't, you save your SSH keys permanently to your computer so it use your key to login without your password.

Create the key pair on the client machine

Code:
ssh-keygen -t rsa
Once you have entered the Gen Key command, you will get a few more questions:

Code:
Enter file in which to save the key ([your user home path]/.ssh/id_rsa):
You can press enter here, saving the file to your user home

It’s up to you whether you want to use a passphrase. Entering a passphrase does have its benefits: the security of a key. Should a passphrase-protected private key fall into an unauthorized users possession, they will be unable to log in to its associated accounts. The only downside, to having a passphrase, is then having to type it in each time you use the key pair.

The entire key generation process looks like this:
(Yes, I already have existing key so I just overwrite it)

Image 1615739884.png


Once the key pair is generated, it’s time to place the public key on the server that we want to use.

You can copy the public key into the new machine’s authorized_keys file with the ssh-copy-id command. Please note, jailbroken devices starts with root@

Code:
ssh-copy-id root@[your jailbroken device IP address]
Type your password again. The key will be added

Image 1615740353.png


As it prompt you to try logging into the machine which is your jailbroken device, try it

Code:
ssh 'root@[your jailbroken device IP address]'
if it shows
Code:
(device name):~ root#
You can see you will not be prompted for a password anymore.

To exit SSH, simple type exit

Image 1615743043.png


Run
Code:
make package install
Again

The installation will no longer prompt you for a password anymore.

The entire process looks like this:

Image 1615743129.png
 
Last edited: