If you have lost your SSH Public key but still have your Private Key you can extract the private key with the following command:
123
lionor$ ssh-keygen -y
Enter file in which the key is (/Users/dave/.ssh/id_rsa):
Enter passphrase:
Your ssh public key will now be displayed.
the above was entered on a Mac, the same applies for Linux obviously your home drive location would be /home – I would recommend this option over opening the file and copying and pasting it out, I would then echo the input into a key file and copy it to the remote server.
In order to login to your Linux Server over SSH from a Mac you must first copy over your Public key and Mac OSX does not come with the ssh-copy-id command so you need to copy the public key from Mac OSX to the Linux server manually.
Copy SSH Public Key to Linux from Mac OSX
This assumes you have access to the remote server via password based authentication (typing in a password), to start with lets copy the key over.
This short tutorial explains how to setup SSH to use key based authentication, by default on CentOS this is disabled. To start with follow our guide on how to generate SSH key pairs and copy the key over.
Configure SSH to enable Public Key Based Authentication
Open up /etc/sshd_config in vi and find the following lines:
The articles explains how to install Wordpress on Ubuntu 12.04, to instructions are step by step and I use the latest version of Wordpress using the .dpkg package from apt.
To start off with install install the Ubuntu Wordpress package with:
1
apt-get install wordpress php5-gd
This should pull down and install everything you need to install Wordpress on Ubuntu, the wp files are installed into the /var/share directory you need to link them and make sure the perms are set correctly.
Create a symlink from /var/share/wordpress to /var/www/wordpress
**Note the -n wordpress should be replaced with the name of your database (unless you want to call it wordpress) and the domain should be changed to your real world domain e.g linuxmoz.com
After configuration you should be good to go, make sure you update Wordpress after the installation as I suspect the package version will be out of date.
If your permalinks for wordpress or another CMS are not working on Ubuntu then you will need to follow this guide. To enablemod_rewrite on Ubuntu enter the following command with root permissions.
Enable mod_rewrite Ubuntu
1
sudo a2enmod rewrite
This will enable mod_rewrite for Apache2 on Ubuntu but we need to edit the default Apache2 config to AllowOverrides from .htaccess files or any rewrite rules created by various CMS’s (wordpress, drupal, etc) will be ignored.
Open the following file default apache2 config file on Ubuntu:
1
sudo vi /etc/apache2/sites-available/000-default
(Obviously you can use whatever editor you like, if you need help check out our vi commands cheat sheet.
Look for the following text “AllowOverride None” and change it to “AllowOverride All” ad restart Apache with:
1
service apache2 restart
Mod_ReWrite will now be enabled on Ubuntu systems running Apache2.
This short tutorial shows you how to list all the installed dpkg packages on Debian (all versions). On most systems (depending on configuration) you do not need root permissions to run this command.
How to list all installed packages on Debian
On the command line enter the following command:
1
dpkg -l
This will dump all the installed packages onto the console, you might want to use less or more to limit the output.
1
dpkg -l | less
or…
1
dpkg -l | more
Alternatively if you are looking for a specific package then enter:
1
dpkg -l | grep php
The example above uses php as a package example you can replace this with any other package name apache2, awk, etc.
This tutorial explains how to upgrade to Ubuntu 12.04 using a CD or DVD – this is often the preferred method if you have a lot of computers to upgrade or if you need to upgrade to Ubuntu 12.04 without a network or Internet connection.
The process is virtually identical to installing Ubuntu however during the process you will be given the option to upgrade depending on the version installed it will either say “Upgrade Ubuntu 10.04 to 12.04 LTS” or “Upgrade Ubuntu 11.04 to 12.04 LTS” the installer all automatically detect the version currently installed on your hard drive.
Here is an image of the upgrade option in the Ubuntu installer:
As mentioned above the process the same of 11.10 only the installer will say upgrade ubuntu 11.10 to ubuntu 12.04.
How To Upgrade Ubuntu 12.04 from CD or DVD Step by Step Tutorial
Below is the step by step guide for the upgrade procedure for 11.10 and LTS to LTS.
Insert the CD or DVD into the drive and select your PC or laptop to boot from CDROM
When prompted click “Install Ubuntu”
Next you are give the option to “Download updates while installing” if you have a working internet connection select this method if don’t have access to the Internet un tick the box. (If in doubt un tick the box you can always install updates later). You are also given the option to install 3rd party software, leave this un ticked for now unless you have something specific you know needs installing
Select “Upgrade from 11.10 to Ubuntu 12.04” (or 10.04 LTS) see the screen shot above
Enter the same username and password you currently use
Click Continue
After the upgrade completed click “Restart Now”
Your home directory and the majority of your settings should be the same as before, if you have any issue with your 12.04 upgrade please post a comment below and I and other members of the community will do my best to help you.
This post contains full instructions on how to upgrade to Ubuntu 12.04 from 10.04 or 11.10 for servers and desktops I have included both GUI and command line upgrade instructions for Ubuntu 12.04 updates.
If you have any 3rd party propriatory graphics card drivers installed it is recommended you remove them prior to the upgrade process to avoid any problems during the update, you can reinstalled them after the upgrade has completed.
Always take a backup before carrying out an operating system upgrade!
How To Upgrade to 12.04 Desktop using the GUI
This is by far the easiest way to upgrade you simple wait until the official release date of 12.04 (which is currently the 26th of April 1012) and upgrade when prompted. If this does not happen it’s probably as the servers are getting hammered by users updating you can either wait or follow the instructions below on how to carry out the network upgrade.
How to Upgrade from 11.10 to 12.o4 for Desktops using Update Manager
If Ubuntu fails to prompt you to upgrade to 12.04 Desktop you can run the update manager process manually, note these instructions are for 11.10 to 12.04 only.
Run the Update Manager application from the Unity Dash
In Update Manager, click on “Settings” and enter your password to start the Software Sources application
Select the sub menu Updates from the Software Sources application
Check the “Release upgrade - Show new distribution releases” drop down to make sure “Normal releases” is selected, and change it if otherwise
Close the Software Sources application and return to Update Manager
In Update Manager, click the Check button to check for new updates.
If there are any updates to install, use the Install Updates button to install them, and press Check again after that is complete
A message will appear informing you of the availability of the new release
Click Upgrade
. Follow the on-screen instructions
Upgrade from 10.04 to 12.o4 for Desktops using Update Manager
The following instructions are for 10.04 to 12.04 Desktop upgrades, this uses a network installation using update manager, please only use these instructions for 10.04 to 12.04 desktops.
Open the Update Manager application from the System → Administration menu
In Update Manager, click the “Settings…”, and enter your password to start the Software Sources application
Select the sub menu Updates from the Software Sources application
Check the “Release upgrade - Show new distribution releases” drop down to make sure “Long term support releases only” is selected, and change it if otherwise
Close the Software Sources application and return to Update Manager
In Update Manager, click the Check button to check for new updates
If there are any updates to install, use the Install Updates button to install them, and press Check again after that is complete
A message will appear informing you of the availability of the new release
Click Upgrade
. Follow the on-screen instructions
Ubuntu Server upgrade to 12.04 using the command line
This is my preferred method of upgrading to 12.04 as it can be ran over SSH or on any version of Ubuntu Server.
To start off with make sure update-manager-core is installed and fully up to date:
1
sudo apt-get install update-manager-core
Edit the file /etc/update-manager/release-upgrades and add set:
With the Ubuntu 12.04 release date just around the corner and the release in final beta we should be expecting a release date any day now, the estimated release date for 12.04 Precise Pangolin is the 26th of April 2012.
Until then you might want to download Ubuntu 12.04 using our instructions, just so long you use apt-get update you will eventually be updated to the final stable release when it’s out. So if you are rolling out new servers now it would make sense to use the final beta and do a apt-get update & apt-get dist-upgrade on the official Ubuntu 12.04 release date and then deploy your production servers.
How to check the version of Ubuntu you are running (e.g 12.04 LTS) the first thing admins require when taking over management of a new server is to find the Ubuntu version, the following methods will find the Ubuntu version from the command line enabling admins to run the command remotely over SSH to help determine the release number.
How to Check the Ubuntu Version
The following command will show the version number from the command line on any Ubuntu release.
How to find Ubuntu version from the command line:
1
cat /etc/lsb-release
Check Ubuntu Version Command
Ubuntu also ships with a command that displays the version, from what I can tell this does exactly the same as the above command but this may change in newer releases.
1
lsb-release -a
Don’t forget to subscribe and follow us on Google+