Thread
:
Howto configure public key based ssh login as user to N900
View Single Post
propelli
2010-02-21 , 17:34
Posts: 9 | Thanked: 8 times | Joined on Feb 2010
#
10
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
Last edited by propelli; 2010-02-21 at
18:23
.
Quote & Reply
|
propelli
View Public Profile
Send a private message to propelli
Find all posts by propelli