Tag Archives: linux

Access shell with SSH on cPanel server from Linux

Some of the important server related problems will be solved only using shell access to the server. To access the cPanel server shell using SSH, there must be an SSH client installed on PC. Most of the Linux distros include SSH client software by default. If it is not installed, then it can be easily installed with following commands,

For Ubuntu: apt-get install openssh-client
For CentOS: yum install openssh-clients

After installation, follow these steps to access the cPanel shell with SSH from Linux:

  1. Login to cPanel and go to Security > SSH/Shell Access to generate SSH key pair.
  2. Click Manage SSH Keys > Generate a New Key. You should use a password to protect the key. You will be asked the password each time you use the key.
  3. In Public Keys section click ‘Manage Authorization’ and ‘Authorize’
  4. In Private Keys section click, Vew/Download then download the key (id_dsa or id_rsa) to your PC.
  5. Save it to ~/.ssh directory on your Linux machine under a meaningful name to not overwrite your existing keys for example id_dsa.myjavahost
  6. Now make sure permissions are correct on the key (one-time task) and connect:
  7. Provide the password for the key, set up in step #2

You should be logged in by now.

Can’t upgrade due to low disk space on /boot

Your /boot partition is filled with old kernels. It does that sometimes, not sure why it is never fixed. You can easily remove the old kernels if you know which packages they came in.

First check uname -a to check your current version.

Then run the following command:

This command will list all packages that you no longer need. I don’t like removing them automatically, I like to be in control when it comes to removing kernels. So for every package listed do the following:


This intermezzo describes in more detail how the commands work and tries to fix an issue with linux-libc-dev:amd64. Most users can skip this paragraph.

  • dpkg -l 'linux-*' list all packages that have a name starting with ‘linux-‘
  • sed '/^ii/!d; remove all lines that do *not* start withii`
  • uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/" find the current running kernel version
  • /'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d Remove all lines, except the ones containing the current running kernel version number
  • s/^[^ ]* [^ ]* \([^ ]*\).*/\1/ For each line list only the package name
  • /[0-9]/!d Remove lines that do not contain numbers.

To fix Frederick Nord’s issue I think the command can be amended as follows:

It basically adds an extra filter:

  • /^linux-(headers\|image)/!d Delete all lines that do not start with linux-headers or linux-image


Where some-kernel-package can be replaced with one of the packages listed. Just beware that you don’t remove the kernel packages that are in current use (as listed by the uname -a) eg. sudo apt-get purge -y linux-headers-3.0.0-12 etc.

It can be automated further using the xargs command, but I don’t like that. It is a personal thing. However, here’s the command to do so:

This is what my /boot looks like, one spare kernel (2.6.38-11) just in case and 3.2.0-24 being current:

And file system usage:


MySQL database difference with MySQL Workbench

mysql-workbenchAs a DB Manager, there is always a need for database synchronization or difference tool to upload the latest changes to the server.

For uploading latest files, there are so many tools freely available like SVN. But when there is a time to upload the database changes, there are very few options available for free. MySQL Workbench is one of the free tools provided by Oracle which provides database synchronization as well as database difference facility.

MySQL Workbench is one of the best tools to manage databases. You can connect multiple databases and query each database separately. And most importantly, it also synchronizes and find difference of online as well as offline database. In both cases, you have to manage models of offline database.

It is a unified visual tool which provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, and much more. MySQL Workbench is available for free on Windows, Linux and Mac OS.

MySQL Workbench is used to visually design, model, generate, and manage databases, which includes creating complex ER models, forward and reverse engineering. It also delivers visual tools for creating, executing, and optimizing SQL queries. SQL editor of MySQL Workbench provides color.

MySQL Workbench also delivers key features like performing difficult change management and documentation tasks, which normally requires much time and effort.

New version of MySQL Workbench also provide database migration from popular database servers to MySQL, which includes Microsoft SQL Server, Sybase ASE, PostreSQL, and other RDBMS. It’s easy to use solution for migrating can migrate tables, objects and data to MySQL to quickly and easily convert existing applications to run on windows and other platforms.

For more information about MySQL Workbench, visit http://www.mysql.com/products/workbench/
MySQL Workbench is freely available at http://www.mysql.com/downloads/workbench/.

Access other computers or allow another user to access your computer securely over the Internet

Chrome Remote Desktop by Google Chrome allows users to remotely access another computer through Chrome browser or a Chromebook.  Computers can be made available on an short-term basis for scenarios such as ad hoc remote support, or on a more long-term basis for remote access to your applications and files.  All connections are fully secured.

All you need is google account to access it. Chrome remote desktop is available free in Chrome Web Store. Download it to your chrome browser and install it. On open, it’ll grant access of your google account. That’s it.

It is the best service for remote desktop till now. It’s not a dependent service of Chrome Browser, after grating access of your google account, all you need is to provide passkey for your computer. After that you can close chrome browser. You can access your computer from anywhere now using your same google account and Chrome Remote Desktop installed in Chrome Browser. Only thing you need to keep in mind is computer should always be in awaken mode.

It is fully cross-platform. It means, it provides remote assistance to Windows, Mac and Linux users, or access your Windows (XP and above) and Mac (OS X 10.6 and above) desktops at any time, all from the Chrome browser on virtually any device which have Chrome Browser with Chrome Remote Desktop installed.

For information about privacy, please see the Google Privacy Policy and the Chrome Privacy Policy.

For help or troubleshooting of Chrome Remote Desktop please click here: