Login to server using PuTTY without password

    SSH is a network protocol that provides secure access to a computer. When we need to connect to a remote computer via SSH, that computer should have a SSH server running on it. There are different ways a client can authenticate itself to the server. A typical authentication mode will be to enter a password when logging into a remote system.

Using the below mentioned steps we can directly login to Linux server without password authentication step.

First we will need to download PuTTY and PuTTYgen.

  • PuTTY: the Telnet and SSH client itself.
  • PuTTYgen: an RSA and DSA key generation utility.

>> Download the latest version of putty.exe and puttygen.exe and start puttygen.exe.

>> We need to generate a key for this process. Puttygen window will appear. Leave the default ‘SSH-2 RSA’ selection. Select the option “Generate”.

>> Select “Save private key” and save the file in a suitable location. Then open the file and select the key written under “Public-Lines 6:”

>> Open putty and type the IP of Linux server and enter into the server using password.

>> Then go to home directory and create a file “authorised_keys” using vi editor in “~/.ssh” directory and paste the key in the file.

>> Change the permission of the file using the command “chmod 600 ~/.ssh/authorized_keys”.

>> Open putty.exe type the IP and then select the option “Connection >> Data”. Type the “Auto-login username” (the username we user for login)

 >> Select the option “SSH >>Auth” and browse the key file.

>> Select open.

Finally we will be able to login without using password.

Webmail loading blank page OR not able to login

Issue :

While accessing Webmail via Squirrelmail, Horde or Roundcube if you are receiving a blank screen or if all the three mail clients tells that the login failed because of wrong user or password, please have a check with the below steps:

Solution :

1. Run the following command in root SSH:

#/scripts/whoowns domain.com

Where domain.com is the domain name in question.

2. If it doesn’t show any ownership, then move the following files:

#cd /etc

#mv userdomains userdomains.bak

#mv domainusers domainusers.bak

#mv trueuserdomains trueuserdomains.bak

At that point, run the following script and recheck ownership for the domain:

#/scripts/updateuserdomains

#/scripts/whoowns domain.com

If instead of showing no ownership, the domain showed the wrong ownership, you’d have to edit the /var/cpanel/users/username file that is improperly owning the domain to remove the DNS line that it has for that domain, then run the above move and updateuserdomains commands.

If after running the command /scripts/whoowns domain.com, you are receiving the below error:

=========

warn [updateuserdomains] Unable to read /etc/trueuserdomains: No such file or directory

warn [updateuserdomains] Unable to read /etc/userdomains: No such file or directory

== WORKAROUND ENABLED ==

Serious Problem — This should never happen!!

The hostname (domain.tld) is owned by the user <username>

== WORKAROUND ENABLED ==

==========

the error will be due to the conflict between hostname and the account.

You’ve set your hostname for the machine to the same domain as this cPanel account. Since the hostname is owned by nobody, it cannot also be owned by username.

Please go to WHM > Change Hostname area and change your hostname to server.domain.tld instead of domain.tld.

After you’ve changed the hostname to be a subdomain off the main domain rather than the main domain itself, then re-do the steps I noted to move those files again and run /scripts/updateuserdomains at that point.

The ownership should be properly set after you get the hostname off your main domain name.

Check emails from other accounts using Gmail

This feature can be used to fetch multiple email account using Gmail. If we have multiple email accounts, we can check them all in Gmail. Gmail’s Mail Fetcher feature first imports all your old messages to Gmail and then continues to bring in new messages sent to your other account. We can add up to 5 accounts in Gmail, including Gmail and other email providers.This all works using POP3.

General settings for using this features with Gmail.
————————————————————–
1. Log into your Gmail account.
2. Click the gear icon in the upper right corner of the page and select Settings.
3. Click the Accounts tab and locate the Check mail from other accounts (using POP3) section.
4. Click Add a POP3 mail account you own.
5. Enter the full email address of the account from which you would like mail fetched.
6. Click Next Step.
7. In the Password field, enter the password for the email address you provided.
8. Select Port 110 for a POP3 connection. For a secure email connection, use Port 995.
9. Click the check-boxes next to the options that best suit your needs:
Leave a copy of retrieved messages on the server
Always use a secure connection (SSL) when retrieving mail
Label incoming messages
Archive incoming messages
10. Click Add Account.