LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to turn off ftp/sftp? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-turn-off-ftp-sftp-587719/)

Tarps87 09-27-2007 07:47 AM

how to turn off ftp/sftp?
 
When I was messing about with samba and other protocols I managed to create a sftp file share and can not work out how to remove it, please can anyone help? Im sure its something simple but I can't even rember how I turned it on
Thanks

trashbird1240 09-27-2007 09:31 AM

Howdy,

Which distro are you using?

Sftp is part of OpenSSH. If you turn of the ssh daemon (service), you
can turn of sftp. This is easy for me in Slackware: I would just
remove the executable permission from rc.sshd:

Code:

chmod -x /etc/rc.d/rc.sshd
You probably have System V init instead, so snoop around in
/etc/init.d. When I say "snoop" I mean do it as a regular user so you
can avoid accidentally deleting something.

Joel

Tarps87 09-27-2007 11:02 AM

Sorry for got to say, is Fedora 6. If I do that will it interfere with samba?
Thanks

trashbird1240 09-27-2007 09:04 PM

I suggest putting your distro in your signature, and in your profile, that way if you forget, you didn't really forget.

Wait for the opinion of a Fedora expert: I've never used a RedHat/Fedora system.

Joel

I_like_TUX 09-27-2007 09:30 PM

Not sure what you have messed up, but to turn off sshd in Fedora:

1. after booted, you can type the following, but it will start again next boot:
$ /etc/rc.d/init.d/sshd stop
you should see [ OK ] message. Do a
$ ps aux | grep sshd
to make sure process /usr/sbin/sshd is not there anymore.

2. If you want sshd not to start at boot, do the following:
$ chkconfig --level 235 sshd off
then do
$ ls /etc/rc.d/rc5.d | grep sshd
to see if you can see the following:
K02sshd
("02" might be some numbers instead, important is you see the "K")
if you see the above, sshd will not start at next boot.

chrism01 09-27-2007 11:51 PM

Just FYI, ftp is separate from sftp/ssh/scp which are also separate from Samba. IOW, you are talking about 3 different services here ....


All times are GMT -5. The time now is 01:11 PM.