maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Accessing the N900 via SSH from Laptop (https://talk.maemo.org/showthread.php?t=38820)

plutonium239 2009-12-30 16:58

Accessing the N900 via SSH from Laptop
 
Although the topic of setting up a SSH connection has been repeatedly covered (particularly in http://talk.maemo.org/showthread.php?t=18798 ), I am still unable to access my N900 from my Laptop

On the N900 I installed OpenSSH Client/Server. Now: Is there anything else I have to do? For instance, create a user? If so, how do i do that? (I am a noob....)

I tried to figure out the IP of the N900 using the command "ifconfig". However I have problems interpreting the output:
Under Link encap:UNSPEC it is written: inet addr:10.77.247.53
which is followed by
Link encap:Local Loopback inet addr: 127.0.0.1
If I use the site www.getip.config I get something like 82.113.106.96
Which of those is my ip?

I entered all 3 ips in the Putty on my laptop, but failed to connect.

Any thoughts? Thx!

SubCore 2009-12-30 17:04

Re: Accessing the N900 via SSH from Laptop
 
Quote:

Originally Posted by plutonium239 (Post 446842)
I tried to figure out the IP of the N900 using the command "ifconfig".

which type of connection do you want to use? the wlan interface usually lists as "wlan0" in ifconfig.
if you want to connect over 3G to your phone - that's probably not going to work, since you don't get a public IP address over 3G.

if the address you mentioned (10.77.247.53) is from the 3G interface (it's called "gprs0" on my device), it definately isn't going to work, because 10.* is a private network, typical for 3G connections.

plutonium239 2009-12-30 17:10

Re: Accessing the N900 via SSH from Laptop
 
Yes, this was a 3G connection. So, if I understood you right, I will never be able to access the phone when on 3G?

I also have wlan at home. Suppose I use that connection (what I do, when at home). What would I have to do?
wlan01 output from ifconfig reads: 192.170.0.158 (connection is established by a router wlan-router)

mikhmv 2009-12-30 17:14

Re: Accessing the N900 via SSH from Laptop
 
Quote:

Originally Posted by plutonium239 (Post 446842)
Although the topic of setting up a SSH connection has been repeatedly covered (particularly in http://talk.maemo.org/showthread.php?t=18798 ), I am still unable to access my N900 from my Laptop

On the N900 I installed OpenSSH Client/Server. Now: Is there anything else I have to do? For instance, create a user? If so, how do i do that? (I am a noob....)

I tried to figure out the IP of the N900 using the command "ifconfig". However I have problems interpreting the output:
Under Link encap:UNSPEC it is written: inet addr:10.77.247.53
which is followed by
Link encap:Local Loopback inet addr: 127.0.0.1
If I use the site www.getip.config I get something like 82.113.106.96
Which of those is my ip?

I entered all 3 ips in the Putty on my laptop, but failed to connect.

Any thoughts? Thx!

Look like you get information about IP from your mobile operator. It is not going to work. Because your IP (10.77.247.53) not reachable from you laptop network.
For connection by ssh you should be in same network. You can do it by connection to WiFi router but Public Wifi usually forbid client-client connection. You will need some private Wifi
Like way (if you don't have private wifi) you can use VPN connection to some network (same network from phone and notebook). If you use VPN than you will be like in same network.

mikhmv 2009-12-30 17:16

Re: Accessing the N900 via SSH from Laptop
 
Quote:

Originally Posted by plutonium239 (Post 446858)
Yes, this was a 3G connection. So, if I understood you right, I will never be able to access the phone when on 3G?

I also have wlan at home. Suppose I use that connection (what I do, when at home). What would I have to do?
wlan01 output from ifconfig reads: 192.170.0.158 (connection is established by a router wlan-router)

use this:
ssh root@192.170.0.158
you will be asked about connection too new computer (yes/no) and about password.

SubCore 2009-12-30 17:16

Re: Accessing the N900 via SSH from Laptop
 
Quote:

Originally Posted by plutonium239 (Post 446858)
Yes, this was a 3G connection. So, if I understood you right, I will never be able to access the phone when on 3G?

exactly. this applies to any phone/device on 3G, btw.

Quote:

I also have wlan at home. Suppose I use that connection (what I do, when at home). What would I have to do?
wlan01 output from ifconfig reads: 192.170.0.158 (connection is established by a router wlan-router)
yep that looks like a proper, local address. if you ssh there (from a device on the same network of course), you will have access.

plutonium239 2009-12-30 17:19

Re: Accessing the N900 via SSH from Laptop
 
Thanks so far guys! Ok, looks like I am slowly getting it. I will only be able to access my phone via SSH if the laptop is in the same wlan network.

Then I would have to enter the IP into Putty , which I get from ifconfig wlan0.

What about creating a ssh user account? Do I have to? If yes, how?

mikhmv 2009-12-30 17:28

Re: Accessing the N900 via SSH from Laptop
 
Quote:

Originally Posted by plutonium239 (Post 446872)
Thanks so far guys! Ok, looks like I am slowly getting it. I will only be able to access my phone via SSH if the laptop is in the same wlan network.

Then I would have to enter the IP into Putty , which I get from ifconfig wlan0.

What about creating a ssh user account? Do I have to? If yes, how?

you have root by default.
user is disable for ssh until it will have password.
you can open x-terminal and type:
1. sudo gainroot
2. passwd user
after this enter new password for user.

plutonium239 2009-12-30 17:28

Re: Accessing the N900 via SSH from Laptop
 
Thanks to your help it works!!!

Is there a possibility to get the whole N900 Gui (not only a terminal like with Putty) onto my laptop (which is running WinXP?)

SubCore 2009-12-30 17:28

Re: Accessing the N900 via SSH from Laptop
 
Quote:

Originally Posted by plutonium239 (Post 446872)
What about creating a ssh user account? Do I have to? If yes, how?

you don't have to, personally i use root for this and then execute "su user" if i don't need root privileges. the openssh installer should ask you for a root password to set, which you then have to use when connecting.

but you can add a dedicated user if you want:

Code:

sudo gainroot
useradd user_for_ssh
passwd user_for_ssh

to verify that it worked, you can do "grep user_for_ssh /etc/passwd" - you should get exactly one line, and the last column should be "/bin/sh", so that your newly created user really does get a shell (command prompt) when connecting via ssh.


All times are GMT. The time now is 00:43.

vBulletin® Version 3.8.8