This gonna be short and sweet.
If you need/want the Drupal Update Manager to work through SSH then you need to install the “libssh2-php” php package on your Ubuntu server. You know the Update Manager; it’s the admin interface when you install a module or theme, or more importantly if you are doing system-wide updates.
Unless you have a very specific reason, you do not want to run an FTP server on your Ubuntu server. Especially, when you have alternatives like SFTP and SCP for transferring files and they are based on SSH.
Now to enable the SSH option on the Update Manager page, you need to install the “libssh2-php” package and reload your apache server.
apt-get install libssh2-php service apache2 reload
Well, that being said, using Drush would be a better choice for these operations but there might be times where you need this.