|
2010-03-10
, 17:20
|
Posts: 393 |
Thanked: 67 times |
Joined on Feb 2010
|
#22
|
|
2010-03-10
, 22:13
|
Posts: 3 |
Thanked: 0 times |
Joined on Mar 2010
|
#23
|
|
2010-03-11
, 18:21
|
Posts: 1,751 |
Thanked: 844 times |
Joined on Feb 2010
@ Sweden
|
#24
|
|
2010-05-03
, 15:45
|
Posts: 20 |
Thanked: 0 times |
Joined on May 2006
|
#25
|
http://ipcheck.sourceforge.net/
Create file /etc/network/if-up.d/dyndns:
#!/bin/bash
cd /path/where/you/keep/pythonscript
python ipcheck.py -i gprs0 username password domain.dyndns.org
chmod 755 /etc/network/if-up.d/dyndns
First time, run manually:
python ipcheck.py --makedat -i gprs0 username password domain.dyndns.org
So it created it's data file.
And now you have autoupdating dyndns on the phone.. happy SSHing
|
2010-05-03
, 16:30
|
Posts: 169 |
Thanked: 56 times |
Joined on Jan 2010
@ Italia
|
#26
|
|
2010-05-03
, 16:53
|
Posts: 1,048 |
Thanked: 979 times |
Joined on Mar 2008
@ SF Bay Area
|
#27
|
|
2010-05-04
, 06:45
|
Posts: 169 |
Thanked: 56 times |
Joined on Jan 2010
@ Italia
|
#28
|
|
2010-05-06
, 19:02
|
Posts: 1,048 |
Thanked: 979 times |
Joined on Mar 2008
@ SF Bay Area
|
#29
|
Why not? From any PC you can ssh to the dest_user@dest_machine (on port 22) and then ssh to n900. Very simple IMO.
The Following User Says Thank You to uvatbc For This Useful Post: | ||
|
2010-05-08
, 07:00
|
Posts: 169 |
Thanked: 56 times |
Joined on Jan 2010
@ Italia
|
#30
|
Yes, it is possible to log in to an SSH server from any machine.
From a security point of view key pairs are typically to be used to machines that you trust. If you're doing keypairs for any random machine then you are compromising the security of your SSH server from the moment you install a key pair on an untrusted machine.
ssh password logins are only slightly better - there are keyloggers to subvert that.
i also dislike having passwords readable to anyone who gets their hands on the phone since "/home/user/.ipcheckrc" is unprotected. yes you can chmod it but why leave it in the user folder then? removing the line ". /home/user/.ipcheckrc" and running "chmod go-r /etc/ipcheckrc" should do the trick after adding a little script (dyndns_autoupdate.sh) -- which updates dyndns every 10 mins -- to /etc/init.d (see below).
This overcomes the issue of /etc/network/if-up.d/ipcheck not always being run when the connection is changed and additionally ensures that your dyndns entry is regularly updated.
on a sidenote.. the sudoers configuration of the n900 is VERY lacking. almost anything that is installed and requires elevated user status will be run as root with no password request. run "sudo -l" to see all the progs that can do this. but i digress.
ofc. a more elegant ipcheck solution would check something other than $IP_ADDRESS before runing ipcheck.py and thus be more efficient but this also does the trick and the script is only called every now and then (its not like you are switching your connection every few ms or anything).
/etc/network/if-up.d/ipcheck
but the idea is the same.
this is easily fixed by adding a script to /etc/event.d that runs the init script in /etc/init.d. naturally you could just write the script into an event.d script but again both options work and the reasoning for the hack is as above (and i am too lazy to backtrack ).
/etc/event.d/dyndns
Last edited by 1i1g; 2010-03-09 at 20:25.