Notices


Reply
Thread Tools
Posts: 152 | Thanked: 41 times | Joined on Dec 2009 @ Sydney
#31
Originally Posted by adrianp View Post
There is the following package in Ubuntu/Debian for this :-
Code:
upstart-compat-sysv - compatibility for System-V-like init
I suspect the idea is to move away from sys-v and just use upstart combined with if-up/down.d for network scripts. Bit confusing for "old-timers" like myself but I'm gradually getting the hang if it.
Thanks.

Yeah I know what you mean. I still have no clue with upstart [yet]
 
schettj's Avatar
Posts: 501 | Thanked: 292 times | Joined on Nov 2009
#32
you could also edit the /etc/ssh/sshd_config file and have sshd listen on some other, more obscure port by changing the line that says

Port 22

to be some other port well about 1024.

Works for me...
 
Posts: 21 | Thanked: 3 times | Joined on Jul 2010 @ London
#33
This is most likely a very stupid question - i'm just starting to learn linux so my knowledge is minimal.

I've spent time reading the posts regarding ssh,
got WINSCP installed on an XP machine and successfully connected from the xp machine into the N900.
Even correctly re-jigged the port to a non default one.

Pinging and tracert shows the N900 is correctly registered on my domain
(connecting to the domains wifi)

But, there's always a but.
How from the N900 would I connect to machines on the domain and browse network shares?
This is where my ignorance comes into play .. is this possible
if so is there a step by step idiots guide anywhere?

Any info / advice much appreciated.
Cheers

.. as an addendum to the above, - unrelated.
How would I open say the sshd_config file on the N900?
Is it via xterm? or is the only way as I've already done by copying to my xp machine and using wordpad?
 
afaq's Avatar
Posts: 1,038 | Thanked: 1,408 times | Joined on Feb 2010 @ London
#34
cant answer the first part but you can edit the sshd_config using midnight commander (from extras i think) straight from ur n900.
__________________
Graphic and Calligraphy Designer
check out my site www.afaqali.com
 

The Following User Says Thank You to afaq For This Useful Post:
Posts: 21 | Thanked: 3 times | Joined on Jul 2010 @ London
#35
I found the Wizard mounter app - that does the job nicely.
Just connect to the domain on wifi, then map and mount network shares

Works perfectly.
 
oKtosiTe's Avatar
Posts: 47 | Thanked: 14 times | Joined on Jul 2010
#36
Originally Posted by adrianp View Post
It seems sshd is started by upstart so removing the rc2.d link won't work. I know little about upstart but sshd is started from /etc/event.d/sshd so it might be possible to change the exec line to a script :-
Code:
script
        if [ -f /etc/dont_start_ssh ]; then
                exit 1
        else
                exec /usr/sbin/sshd -D
        fi
end script
This is untested but I don't think it will cause any problems with booting the N900 itself, just sshd. Make a backup before trying though; oh and let us know how it goes.
That would work fine, but I'm using "SSH Status and Switcher", an application that lives in the notification area and allows me to switch the SSH server on or off with two simple clicks. With the above fix, said program also fails to start the server.
I think what's needed here is a different condition, say by checking the current runlevel or for a running process, so that starting of the SSH server is only inhibited during the boot process.
I will post back if I learn more.

Edit: I just tried scripting it to check for the current runlevel, but that came back with a permission denied for some reason; it worked fine when executing the same commands manually.

Last edited by oKtosiTe; 2010-08-03 at 17:55.
 
int_ua's Avatar
Posts: 676 | Thanked: 1,067 times | Joined on Jul 2010 @ Kyiv, Ukraine
#37
installed openssh-server and executed
Code:
cat /etc/init.d/ssh
There is already a function named check_for_no_start() checking if /etc/ssh/sshd_not_to_be_run is existing.
Don't know if creating this file will affect applet. Will try later.

Last edited by int_ua; 2010-09-08 at 11:58.
 

The Following User Says Thank You to int_ua For This Useful Post:
oKtosiTe's Avatar
Posts: 47 | Thanked: 14 times | Joined on Jul 2010
#38
Originally Posted by int_ua View Post
installed openssh-server and executed
Code:
cat /etc/init.d/ssh
There is already function, named check_for_no_start() checking if /etc/ssh/sshd_not_to_be_run is existing.
Don't know if creating this file will affect applet. Will try later.
I think I tried that, and I seem to recall that that made the applet not work, but it's been a while ago, so I can't be certain.
 
int_ua's Avatar
Posts: 676 | Thanked: 1,067 times | Joined on Jul 2010 @ Kyiv, Ukraine
#39
Originally Posted by oKtosiTe View Post
I think I tried that, and I seem to recall that that made the applet not work, but it's been a while ago, so I can't be certain.
Then someone should ask applet author to add support for such feature and create/delete this file to make changes permanent and reboot-resistant.
 
Posts: 50 | Thanked: 36 times | Joined on Aug 2010
#40
Hello guys,

tonight I had the same issue and with some hints from the #n900 channel I was able to arrive at a quick fix to do what we want it to do... but it's that..a quick hack. Next time you update your packages it will be written over.
Apparently the N900 does not use the SysV init files that we all know and love but it uses upstart

so, to solve our little problem, I simply changed the file responsible for starting ssh

go to /etc/event.d and edit sshd with your favorite UNIX aware text editor.

replace:
Code:
start on stopped rcS
with

Code:
#start on stopped rcS
By commenting it out it won't be started automatically.

That's it. Reboot your phone and all is good.
 

The Following User Says Thank You to quanttrom For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 21:32.