Enabling/disabling VSFTPD via SSH
I have an FTP server set up on my Ubuntu box using vsftpd.
I only need to access it infrequently, therefore for security reasons I was wondering if there was a simple way to enable/disable it via SSH. I did try SSHing in and using Quote:
Many thanks for any help. Tim |
Quote:
1. To stop till next reboot Code:
sudo stop vsftpd Code:
sudo start vsftpd Code:
sudo status vsftpd Code:
sudo restart vsftpd Code:
echo manual | sudo tee /etc/init/vsftpd.override Code:
sudo rm /etc/init/vsftpd.override |
If you are using ubuntu 15.10 or newer, you are dealing with systemd.
To start Code:
sudo systemctl start vsftpd.service Code:
sudo systemctl stop vsftpd.service Code:
sudo systemctl restart vsftpd.service Code:
sudo systemctl enable vsftpd.service Code:
sudo systemctl disable vsftpd.service Code:
sudo systemctl status vsftpd.service |
Sorry my version info was out of date, I'm on 16.04.
I did try Code:
sudo stop vsftpd Code:
sudo stop vsftp Code:
stop: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused |
using your
Code:
sudo systemctl stop vsftpd.service Code:
sudo systemctl status vsftpd.service Code:
Jul 24 17:35:31 p5e systemd[1]: Stopped vsftpd FTP server. |
What client application are you using to connect to the server?
|
Quote:
|
That client can use sftp, are you sure that you are not using that instead of ftp?
|
Quote:
|
sftp is not the same as ftp.
Look at the output of the nmap command to confirm that the ftp port is inactive. nmap IP_address -p 21 |
Quote:
|
Quote:
|
ufw possibly help?
short version on the ftp "server" Code:
sudo ufw deny 21 |
vsftpd stands for Very Secure FTP Daemon. As stated it is not a sftp server which is a subsystem of ssh. There is no inherent reason to disable sftp as it is just as secure as ssh.
I assume that your not really using vsftpd so disabling it is a good idea. |
All times are GMT -5. The time now is 12:29 AM. |