Active Topics

 



Notices


Reply
Thread Tools
eitama's Avatar
Posts: 702 | Thanked: 334 times | Joined on Feb 2010 @ Israel.
#11
Originally Posted by propelli View Post
There is also an easy way to connect to your n900 remotely when you have set everything up according to greygoo's howto. What you need is a fixed ip and a ssh server on your laptop's side. This might also work with some dyndns service, but I'm not sure of that, since I have never tested it with dyndns.

Just open a remote tunnel from your n900 to the server running on your laptop:

ssh -i yourkey -R localhost:3333:localhost:22 someuser@server.ip

The good part is that this tunnel works regardsless of the ip of n900 (that is: you don't have to know it) and the tunnel works well even over gprs connection.

to connect to n900 from your laptop:

ssh -p 3333 user@localhost

Now all that is left to do to be able to connect to your n900 when it is e.g. lost, is to set up a daemon to connect to the server periodically or to setup autossh (don't know if autossh is available for n900) to keep the tunnel open at all times.

Oh, I forgot to mention this:
Before you can use the reverse tunnel to connect to n900 without password (the -i yourkey part above) you need to create a keypair on the n900 and copy n900's public key to the laptop's authorized_keys file:

on n900 do:

ssh-keygen -t rsa

scp id_rsa.pub someuser@server.ip:./ssh/n900.pub

on the laptop do:

cd .ssh/

cat n900.pub >> authorized_keys

propelli
I wish I saw your post before I wrote the wiki, and not after (:
http://wiki.maemo.org/Reverse_ssh
__________________
| Developer of Horizontal-Call - Call your contacts, fast! |
| 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 |
 
Posts: 32 | Thanked: 2 times | Joined on Nov 2009 @ Zürich
#12
Stuck at step 2. Permission denied, please try again. I've already changed the root password
 
Posts: 415 | Thanked: 732 times | Joined on Jan 2009 @ Finland
#13
One liner version:

Code:
cat ~/.ssh/id_rsa.pub | ssh root@[device's ip] "mkdir ~/.ssh ; cat >> ~/.ssh/authorized_keys"
 
Reply

Tags
public key, ssh


 
Forum Jump


All times are GMT. The time now is 22:22.