Problem
WordPress installation display error “Failed to connect to FTP Server” when you try to update plugins and it displays a form requesting web site name, user name and password.
Solution:
You need to change your wordpress directory’s owner to web server. For my Linux installation, the web server is: www-data
Use this command to change your directory owner:
sudo chown -R www-data:www-data /path_to_your_wordpress_directory/
Reference
See How to Find and Change Linux Directory Owner for more command information.