Can I install/update WordPress plugins without providing FTP access?

I am using WordPress on my live server which only uses SFTP using an SSH key.

I want to install and upgrade plugins, but it appears that you are required to enter your FTP login to install the plugins. Is there a way to install and upgrade plugins by manually uploading the files instead of having WordPress handle the entire process?

Ref: Some Don'ts After Installing CyberPanel! — CyberPanel - WebHosting Control Panel for OpenLiteSpeed

Don't upload files via SFTP

When you upload files via sftp they are owned by root, and CyberPanel runs each account through its own user, so once you have uploaded content via root, you might start getting permissions errors. More details can be found here.

Even though file manager now has one-click fix permission button to get rid of this issue, but this is still not a recommended way to upload content.

The recommended way is to use File Manager and FTP. They both use the same user as which scripts are executed for a particular site.

Note: As soon as files are owned by root, file manager may not be able to access and you will start having issues.

So after uploading content via SFTP click ‘Fix Permissions’ from the File manager and WordPress will not ask you for FTP details when installing plugins/themes.