I am not sure which user you tried to login. Basically the default user and owner are by web user (usually is www-data on Debian system).
So you can make the www-data user has the bash permission and login as www-data user to update the file (This might has potential security issue to make www-data has bash permission)
or `chown /var/www/xxx/xxx` to www-data:USER-NAME and `chmod to 775`(default is 755)
or just upload files to /home/YOUR_USER/ folder and then SSH as root user to modify the file.