Problem

If you are reading this because when you are trying to update your Wordpress, it won't update and asks for a SSH username/password instead, as shown in the picture.

Solution:

1. SSH into the server where you have the WP website.

2. cd to the physical directory where you have the website: e.g. cd /var/www/html directory.
To understand you are in the correct place, look at the files in the directory, you should see a wp-admin and wp-content folders alongside a lot of wp-****.php files.

3. Open wp-config.php with a text editor

sudo nano /var/www/html/wp-config.php

4. You will see a section with a lot of commands similar to this:

define('XXX_XX_XXXXX','xxxx');

copy/paste this command define('FS_METHOD','direct'); among all the others. Pay attention to copy exactly as specified here, including the trailing semi-colon and double check the case.

5. If it still does not work because Wordpress tells you that '...This is usually due to inconsistent file permissions...' you may need to reset the Wordpress files ownership to be the apache user.
If you are running a standard Apache web server, then you probably want to execute a command similar to this:

sudo chown -R www-data:www-data /var/www/html

where the first www-data is the user, the second www-data is the group and the path is the root path of Wordpress (the one at bullet point 2)

6 Done. Try to update Wordpress plugins and you should be able to do this now.