Recently I received an email from my hosting "Apply this critical security patch for your magento website", so I gone through a process that how to apply patch on magento hosted in an online server.
In my case the patch
SUPEE-5344 was patch.
Downloading patch
- Log in to your Magento admin panel (http://your domain name/admin).
- Note your version, which displays at the bottom of the page as Magento ver.
- Go to the Magento website.
- In the Magento Community Edition Patches area, next to SUPEE-5344, from the Select your format menu, click the option that corresponds to your version of Magento.
For example, if you have Magento version 1.6.2.0, you would click Magento-CE-v1.6.1.x-1.6.2.x
- Click Download.
- Log in to your Magento account to complete the download.
- Copy down the name of the extension that you download.
Upload patch
Apply patch
- Enable SSH on your server, in godaddy server you can find it in security section SSH Access. Click on "SSH Access"
 |
| Click on SSH Access |
 |
| Click on Manage SSH Keys |
 |
| Click on Generate New Key |
 |
| Provide parameters and Click on Generate Key |
 |
| Click on Manage link on newly generated Key |
 |
| Authorize it |
 |
| Click on newly generated private key View/Download link |
 |
| Provide password and click on convert |
 |
| Download Key to use it in putty |
 |
| Open Putty enter your website address |
 |
| Browse downloaded key |
 |
| Click on Open button |
 |
| Provide username and password which you use to login on your server (hosting server) |
 |
Once you logged in, go to public_html where you have uploaded your patch file, depending on patch file type run command as above.
sh <patchfile name> |
Reference : godaddy.com