Change default ‘From’ email name from www-data in PHP

I’ve been seeing up an Amazon EC-2 server with Debian Squeeze and used tasksel to install Web Server and Mail Server. Like all things debian, this worked pretty well after the installation completed and everything ‘just worked’ however I wasn’t happy with the default from name and email address assigned to emails sent by PHP – www-data .

I discovered a quick and simple fix to change these defaults for all mail sent with PHP:

Open /etc/php5/apache2/php.ini and set

Commandsendmail_path = ‘/usr/sbin/sendmail -t -i -fno-reply@my.domain.com -Fno-reply’

Restart apache

sendmail_path = ‘/usr/sbin/sendmail -t -i -fno-reply@my.domain.com -Fno-reply’

amazon server login with .ppk file in ubuntu

To convert the ppk file into openssh standard, we need to install the puttygen tool:

sudo apt-get install putty

Here is the ppk key that we want to convert:
Now,convert the ppk file into openssh standard using the following command:

puttygen private.ppk -o private-key -O private-openssh

Where “private.ppk” is the PuTTY .ppk file to convert, and “private-key” is the name of the converted key file.

After the execution of above command:

Now, you can easily access the remote server using the openssh standard private key:

ssh -i private-key username@remote-server-ip