maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   How to connect to N900 by ssh without Mad Developer? (https://talk.maemo.org/showthread.php?t=61695)

justforfun 2010-09-04 10:07

How to connect to N900 by ssh without Mad Developer?
 
Hi, I can connect to my N900 by using command below.

ssh root@192.168.2.15:

But the precondition is that I open and start Mad Developer on N900 already.
And if I close Mad Developer now, I still can connect to N900 by ssh.

But if I restart my N900 and don't open Mad Developer any more, then I try to connect to N900 by ssh, I get the response like below.

ssh: connect to host 192.168.2.15: port 22: Bad file number

Does anyone know why and how to solve it? Thanks!

casper27 2010-09-04 10:20

Re: How to connect to N900 by ssh without Mad Developer?
 
Have you downloaded ssh client and server from repos. The service will start automatically.

fnordianslip 2010-09-04 11:09

Re: How to connect to N900 by ssh without Mad Developer?
 
You have a superfluous colon at the end of:
ssh root@192.168.2.15:

justforfun 2010-09-04 13:19

Re: How to connect to N900 by ssh without Mad Developer?
 
Quote:

Originally Posted by casper27 (Post 806982)
Have you downloaded ssh client and server from repos. The service will start automatically.

Yes, I checked that I installed OpenSSH-Client and Open-Server. In fact, when installing Mad Developer, both OpenSSH-Client and Open-Server will be installed because of the dependency.

justforfun 2010-09-04 13:20

Re: How to connect to N900 by ssh without Mad Developer?
 
Quote:

Originally Posted by fnordianslip (Post 807008)
You have a superfluous colon at the end of:
ssh root@192.168.2.15:


I remove it, but the result is same.

kureyon 2010-09-04 16:42

Re: How to connect to N900 by ssh without Mad Developer?
 
Is the ssh server started?
Code:

ps ax | grep sshd
You can start it by
Code:

/etc/init.d/ssh start
And you should be able to make it autostart (on reboot) by:
Code:

update-rc.d ssh default

timoph 2010-09-04 17:15

Re: How to connect to N900 by ssh without Mad Developer?
 
USB networking enabled? I'd guess mad dev enables it when you start it.

http://wiki.maemo.org/N900_USB_networking

Venemo 2010-09-04 17:29

Re: How to connect to N900 by ssh without Mad Developer?
 
Quote:

Originally Posted by justforfun (Post 806976)
Hi, I can connect to my N900 by using command below.

ssh root@192.168.2.15:

But the precondition is that I open and start Mad Developer on N900 already.
And if I close Mad Developer now, I still can connect to N900 by ssh.

But if I restart my N900 and don't open Mad Developer any more, then I try to connect to N900 by ssh, I get the response like below.

ssh: connect to host 192.168.2.15: port 22: Bad file number

Does anyone know why and how to solve it? Thanks!

This is because Mad Developer starts USB networking when you start it. If you don't start Mad Developer, it can't enable USB networking for you.

Note that SSH also works over a Wi-Fi connection, for which you don't need Mad Developer. Just install the OpenSSH service for this.

hans51 2010-09-04 18:46

Re: How to connect to N900 by ssh without Mad Developer?
 
For successful USB-SSH connection, I have installed on my N900:

openSSH client and server
and to switch SSH ON or OFF I use:
SSH status and switcher widget

then I start on N900 bash:

ifup usb0

then on my laptop ( I use below ONE line as a bash alias !):

sudo ifconfig usb0 192.168.2.14 netmask 255.255.255.0 && ssh root@192.168.2.15

after that I am connected
when connecting USB cable - the N900 mode is PC suite mode

justforfun 2010-09-12 03:47

Re: How to connect to N900 by ssh without Mad Developer?
 
Quote:

Originally Posted by timoph (Post 807240)
USB networking enabled? I'd guess mad dev enables it when you start it.

http://wiki.maemo.org/N900_USB_networking


Hi, I took a look at that link and found below sentence.
'To use the USB network mode alongside with a Windows host, you must use MADDE.' So I guess it is necessary to boot MADDE first and then use ssh for connection between PC and N900.


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

vBulletin® Version 3.8.8