maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   accessing N9 thru SSH over wifi (https://talk.maemo.org/showthread.php?t=79355)

F2thaK 2011-10-25 12:41

accessing N9 thru SSH over wifi
 
accessing N9 thru SSH over wifi


how do you do it?

Ive activated developer mode, run SDK connect, got IP and password and attempted to gain access. What user name do you use? I tried root and user. No go.

--------------------------------------------------------------------------------
Post PR1.1, to enable remote root login again (or rather make it controllable via
/etc/ssh/sshd_config like before):


Code:

echo -e 'mkdir -m 0755 -p /var/run/sshd\nexec /usr/sbin/sshd $SSHD_OPTS' >> /etc/default/ssh
pkill -9 /usr/sbin/sshd

annd reboot.

ukki 2011-10-25 12:48

Re: accessing N9 thru SSH over wifi
 
Quote:

Originally Posted by F2thaK (Post 1113381)
accessing N9 thru SSH over wifi


how do you do it?

Ive activated developer mode, run SDK connect, got IP and password and attempted to gain access. What user name do you use? I tried root and user. No go.

On N9 open terminal and run:
Code:

devel-su (password is rootme)
passwd user (and enter some password)

Then ssh in as 'user' using the password you just set.

EDIT: Not sure you need to be root for that, simple 'passwd' as user could work too.

F2thaK 2011-10-25 13:11

Re: accessing N9 thru SSH over wifi
 
thanks!.......

mooglez 2011-10-25 13:28

Re: accessing N9 thru SSH over wifi
 
Any problems connecting over 3G? Wifi seems to work fine for me, but attempting to connect to an N9 that is on 3G connection fails.

oweng 2011-10-25 13:30

Re: accessing N9 thru SSH over wifi
 
Quote:

Originally Posted by mooglez (Post 1113415)
Any problems connecting over 3G? Wifi seems to work fine for me, but attempting to connect to an N9 that is on 3G connection fails.

Are you even on the same network? Can you 'see' eachothers IPs?

mooglez 2011-10-25 13:43

Re: accessing N9 thru SSH over wifi
 
Quote:

Originally Posted by oweng (Post 1113416)
Are you even on the same network? Can you 'see' eachothers IPs?

not on the same network

i've added the ip address that my putty is on to the N9 openssh config as an allowed host (previously only the common intranet addresses were there)

I think i had this working before i started messing with some of the settings, which is why it would be nice if someone confirmed that they can connect normally over 3G via SSH

reinob 2011-10-25 14:52

Re: accessing N9 thru SSH over wifi
 
You don't normally get a public IP when on 2G/3G, in which case you won't be able to connect from a device outside of that network.

uvatbc 2011-10-25 15:15

Re: accessing N9 thru SSH over wifi
 
Quote:

Originally Posted by ukki (Post 1113383)
On N9 open terminal and run:
Code:

devel-su (password is rootme)
passwd user (and enter some password)

Then ssh in as 'user' using the password you just set.

EDIT: Not sure you need to be root for that, simple 'passwd' as user could work too.

+1 for this post.
Also: if you do a passwd without devel-su then it refuses to change the password.

mooglez 2011-10-25 15:24

Re: accessing N9 thru SSH over wifi
 
Quote:

Originally Posted by reinob (Post 1113449)
You don't normally get a public IP when on 2G/3G, in which case you won't be able to connect from a device outside of that network.

i do on mine. worked just fine on my n900, and i think it was working for me previously on N9 also.

SteveYoungs 2011-10-28 03:38

Re: accessing N9 thru SSH over wifi
 
Quote:

Originally Posted by F2thaK (Post 1113381)
accessing N9 thru SSH over wifi


how do you do it?

Ive activated developer mode, run SDK connect, got IP and password and attempted to gain access. What user name do you use? I tried root and user. No go.

Well, I've never used the SDK connect thing, but the way I set mine up was...

From terminal on N9:

Code:

devel-su
mkdir .ssh
su - developer
mkdir .ssh

From PC:

Code:

$ scp ~/.ssh/id_dsa.pub root@[N9's IP]:.ssh/authorized_keys
At this point you should be able to ssh from your PC to your N9 as the root user with a simple: `ssh root@IP' with no need for a passwd because it is using SSH keys.

Now all you need to do is copy /root/.ssh/authorized_keys to /home/developer/.ssh/ and make sure you chown it to the right user/group. The easiest way to do that is copy it as root to a temporary file in /home/developer/.ssh/ and then switch to the developer user and then cp it to authorized_keys file.

I tried doing the same thing with the "user" user, but for some reason it would not let me log in via ssh afterwards. But seeing as though the user "developer" has the same userid it doesn't really matter. :-)

Another good thing to do is to create a SSH key pair for the N9's user, "user". Then you can put the .pub on any machine you want to ssh to from your N9. It is very handy being able to log into my desktop at home no matter where I am in the world. :-)


All times are GMT. The time now is 15:09.

vBulletin® Version 3.8.8