![]() |
disabling ssh server on n900
sorry i asked this in another thread but no one answered
i want to stop the ssh server to possibly save some power and increase security i learnt to root and "/etc/init.d/ssh stop" to stop the server. i know that works because it said ssh stop then i tried "rm -f /etc/rc2.d/s55ssh" to stop it for autostarting. that worked because i tried to connect but couldnt. and then finally i tried "ln -s /etc/rc2.d/s55ssh -> /etc/init.d/ssh" incase i wanted the autostart function back. dont know if that works because he said it would need a restart. now i dont know if any of it works anymore because i don't get the ssh stop message when trying to stop it. and offcourse the server doesnt stop. i tried restarting and trying it again but still don't work could the last command i entered stuffed it up? one more thing. my phone acted pretty strange when trying to type this. the browser would just dissappear when im almost finished typing or would go to a different page. i tried to type this 3 times now before giving up and type it on my computer... scary :S |
Re: disabling ssh server on n900
I think your ln command is the wrong way around. It's:
ln -s target link_name |
Re: disabling ssh server on n900
If you typed it in exactly as you've shown it here, you've wiped out the original /etc/init.d/ssh file (by redirecting an error message to it). You'd best uninstall openssh server, make sure /etc/init.d/ssh is deleted, then reinstall.
EDIT: In fact, the error should go to stderr rather than stdout, so you'd just have truncated the init file. |
Re: disabling ssh server on n900
thanks il try that
|
Re: disabling ssh server on n900
1 Attachment(s)
z3phyr: Really sorry about that duff ln -s command... :( That was from one of my posts I think (I fixed it now) Too much cut and paste, I'm afraid.. I had just pasted in the output of ls -l on the link and meant to go back and turn it into the command, but only got halfway. Mea culpa!
I'm attaching my own /etc/init.d/ssh file (I renamed it ssh.txt so I could upload it) It should be the same as what that command wiped out, so you could just put it in place and then run the ln -s /etc/init.d/ssh /etc/rc2.d/s55ssh command (or whatver it was ;) ) |
Re: disabling ssh server on n900
Quote:
its okay. still learnt something. i tried putting in your ssh file but now when i try stopping it i just get permission denied |
Re: disabling ssh server on n900
yep, you'll need to do
chmod 755 /etc/init.d/ssh to give it the 'execute' permission also there's a better way of controlling startup scripts.. I'm pretty sure it's mentioned later on in the thread where you got my bogus ln command |
Re: disabling ssh server on n900
Quote:
Code:
script |
Re: disabling ssh server on n900
Quote:
yeah it works. thanks alot. everything working okay by the looks of it. last night i was playing with the "update-rc.d -f ssh remove" command. it removed some ssh entries. not too sure what that does, hope it don't cause any problems where can i learn what the options means like the -f and -d etc. |
Re: disabling ssh server on n900
Quote:
Code:
update-rc.d - install and remove System-V style init script links |
All times are GMT. The time now is 02:25. |
vBulletin® Version 3.8.8