Monday, June 27, 2011

SSH: "Remote host Identification has changed" error


SSH is the most common and widely used method for remote login. It is better the Telnet because it provides authentication mechanism to secure your machine (If you dont want to enter your password each time when you login, checkout the previous post on passwordless-ssh-login-howto). But, sometimes one may find that the machine that we used to login sometime back is refusing to authenticate. If the error that you found is
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
9b:8e:77:08:7c:8f:2d:f7:0b:4e:dc:d3:98:29:dd:ec.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:8
RSA host key for 192.168.1.8 has changed and you have requested strict checking.
Host key verification failed.
Just delete the file ~/.ssh/known-hosts.
> rm ~/.ssh/known-hosts
 Thats it, now try running ssh at the terminal it will succeed.

Thursday, June 16, 2011

Ubuntu: Creating a bootable Pendrive

 In this post, I will demonstrate how to create a bootable pendrive from an .iso image on ubuntu. Creating a bootable pendrive is very easy in ubuntu. If you are using ubuntu 10.10, then goto
System->Administrator->Startup Disk Creator
Select Startup Disk Creator it will prompt for password if you are not root, enter the password and it starts. It looks like this

Startup Disk Creator


Once you have started the Startup Disk Creator follow these steps to create a bootable Pendrive:

1. click on  "other" button and select the location where you have stored the .iso file.


2. Then if you want to erase all the data on the pendrive then press on "Erase Disk" button and wait for it complete. Skip this step if already empty.


3. Select "Make Startup Disk" button.







Thats it. Once it completes you have a bootable pendrive which you may use it for
  • liveCD
  • installing a fresh distro installation

I have tested this for creating a bootable pendrive from ubuntu-11.04.iso on ubuntu-10.10. If you happen to use it for other distros then do post your results

Friday, June 3, 2011

mencoder: Converting .ogv to .avi

recordMyDesktop produces videos in .ogv format. Youtube and many other websites fail to play the .ogv video. Use mencoder to convert the .ogv video. mencoder is a simple movie encoder, designed to encode MPlayer-playable movies to other  MPlayer-playable formats.

In ubuntu, install the mencoder using
>sudo apt-get install mencoder
once installed, use the following command to covert the .ogv file to .avi file.
>mencoder video.ogv -ovc xvid -oac mp3lame -xvidencopts pass=1 -o video.avi
 There are many more options to mencoder, read the man page for more info.

gtk-recordMyDesktop

The Chinese proverb "A picture is worth thousand words" fits perfectly here, so I will be demonstrating by showing a video.


The front end makes use of the commandline options to perform the task, which means that the things we achieve through the gui can also be done through the commandline.

Prev 

Simple video capture

Simple video capture:
We start by exploring the recordMyDesktop through command line. If you just cant wait to capture your first video, then follow the command to start recordMyDesktop from the command line
>recordmydesktop --no-sound -o my-first-video.ogv
 When you enter this command you will see



                                           
From the screenshot, you can see that the recordMyDesktop records the desktop session untill a ctrl+c is pressed to stop it. On receiving the signal, it stops capturing the video and starts encoding the video. Once it completes, we have successfully captured the video. By default the video is saved in the home directory.

By default recordMyDesktop captures the whole screen, but we can pass options to configure it according to our needs. For more information check the man page.

Prev Next 

RecordMyDesktop

Intro:

recordMyDesktop is an open source free software used to record desktop session on GNU/Linux. It is a very handy application to have on Linux and one can find lot of videos on net which make use of recordMyDesktop.  The project was started by John Varouhakis in 2006 and he continued to be the maintainer of the project for a long time. The project has not seen an active traffic for last year or two. The last release was  0.3.8.1. The project is hosted on sourceforge. Here is the link to download the source code.
 
Like many other linux softwares out there, recordMyDesktop also comes in two flavors: the typical of linux commandline and two graphical frontends, gtk-recordMyDesktop and qt-recordMyDesktop. Most of the Linux destro's have recordMyDesktop pre-installed in them. To install it on ubuntu, use
> sudo apt-get install gtk-recordmydesktop 
gtk version of recordMyDesktop
One last important nugget is recordMyDesktop supports only .ogv theora for video encoding, and .ogv vorbis for audio. If you want to convert your screencasts to other formats there are many good Linux tools for this and also you can find very helpful information here.

Next