View Single Post
Old 07-30-2016, 01:37 AM   #1
nasser
Evangelist
nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.
 
nasser's Avatar
 
Posts: 477
Karma: 445678
Join Date: Feb 2010
Device: Too many..
SSH over Wi-Fi: Fixed I.P for Kindle?

On my PW1(jailbroken), I am able to do an ssh login over wifi.
However, the I.P keeps changing between sessions(DHCP from router).
There doesn't seem to be any way in the pw1 settings to make this a fixed I.P., like in, say Ubuntu Linux.
This is useful for keeping a fixed setting on say, my laptop to do a SSH login, instead of checking what the current I.P is every time and then feeding that I.P into the SSH command/client.

After some fiddling, I got this to work:
In kterm, I entered: ip addr add <desired I.P> dev wlan0
<desired I.P> is something like x.y.z.99 which I know will never be allotted by the DHCP.
Now, I'm able to login on the new, fixed I.P. The above command could obviously be turned into a KUAL extension.

Some drawbacks:
1. Existing I.P got from DHCP is also retained(unless I do a "ip addr del .." command). I can continue logging in on this I.P too!
2. The new I.P is not persistent. It is lost even when the screensaver kicks in.

Request some help from you experts to polish this hack!
nasser is offline   Reply With Quote