| The Following User Says Thank You to eitama For This Useful Post: | ||
|
|
2010-06-02
, 08:24
|
|
|
Posts: 702 |
Thanked: 334 times |
Joined on Feb 2010
@ Israel.
|
#12
|
Sounds like you're doing the right thing. I've never used freesshd so can't help you there, or troubleshoot Windows firewall problems for you. Maybe try the freesshd forums or google the exact error message.
|
|
2010-06-02
, 08:54
|
|
|
Posts: 253 |
Thanked: 184 times |
Joined on Nov 2009
@ Bristol, UK
|
#13
|
OMG! It's working!!!!!!!
I just sshed to my router, ran the commands, and it worked!!!!
Now another question, I am a bit confused with the ssh keys.
I am getting prompted for a password on the N900 when running the "ssh -R command"
Do I need the public key from the router on the N900? or from the N900 on the router? I don't want to lose the password configuration in general, just for this command!
Also, any idea how I make this ssh loop run in the background and on startup?
I know my way around creating .sh file and giving them run permissions, I just need to know where to put it. maybe i'll make some code to check if there is internet connectivity, and if not, stop the loop or increase the sleep time.
|
|
2010-06-02
, 08:57
|
|
|
Posts: 702 |
Thanked: 334 times |
Joined on Feb 2010
@ Israel.
|
#14
|
You need to copy /home/user/.ssh/id_rsa.pub (from your N900) into ~user/.ssh/authorized_keys on your router. This is assuming you're sshing into an account called "user" on the router - I'm not running dd-wrt so again I can only guess.
Make sure authorized_keys has permissions 600 and ~user/.ssh has permissions 700 (on the router).
I don't know the best place to put a script like this on the N900, maybe someone else can help? Perhaps copy & modify one of the files in /etc/rc2.d but careful you may be able to hose your device if you mess it up. Get it running from the terminal first!
If you're running your script as root (which you will be if you're running it at startup) then su to user first so that the ssh client finds the right rsa key (otherwise it'll be looking at ~root/.ssh/id_rsa.pub, which doesn't exist)
su -c "ssh -N -C -R 2222:127.0.0.1:5000 myhomepc.net" user
|
|
2010-06-02
, 09:16
|
|
|
Posts: 702 |
Thanked: 334 times |
Joined on Feb 2010
@ Israel.
|
#15
|
|
|
2010-06-02
, 16:34
|
|
|
Posts: 702 |
Thanked: 334 times |
Joined on Feb 2010
@ Israel.
|
#16
|
|
|
2010-06-02
, 17:02
|
|
|
Posts: 702 |
Thanked: 334 times |
Joined on Feb 2010
@ Israel.
|
#17
|
|
|
2010-06-03
, 08:01
|
|
|
Posts: 702 |
Thanked: 334 times |
Joined on Feb 2010
@ Israel.
|
#18
|
http://www.openvpn.net/index.php/ope...ion/howto.html
| The Following User Says Thank You to eitama For This Useful Post: | ||
|
|
2010-06-03
, 14:56
|
|
|
Posts: 609 |
Thanked: 243 times |
Joined on Jan 2010
@ Eastern USA
|
#19
|
I'm also a moderator of the Applications, Nokia N900, and Maemo 5/Fremantle forums. |
|
2010-09-26
, 11:04
|
|
Posts: 12 |
Thanked: 5 times |
Joined on Mar 2010
|
#20
|
And iv'e searched google and freesshd forums for the errors and all sort of keywords yesterday. I'm pretty much stuck. (:
I'll see if I can make my dd-wrt router do this (: it is linux after all.
Edit : Oh Oh! I almost forgot! Thanks for the help (:
| Reverse SSH - access your N900 from anywhere, anytime |
| Using Samsung Galaxy S GT-i9000 and Nokia N900 |
| DonateMe - If you feel I helped you in a very good way, feel free to donate |