Wednesday, January 18, 2012

අතීතය

ආසයි,භයයි
සතුටුයි, දුකයි.
ආඩම්බර වගේම ලැජ්ජත් හිතෙනව
මතක් කරන්න...
ආපහු යන්න පුලුවන් උනොත්, අනේ මන්ද.
මහ පුදුම දෙයක්
අතීතය කියන්නෙ

Wednesday, January 11, 2012

Host Key Verification Failed in SSH



When I was trying to connect to a remote host through a server, I faced this key verification failure. This can be happened due to different reasons.
1. The remote server has re-installed the SSH server.
2. Remote server has generated a new host key.

 In my case I could able to fix this as follows and think this will helpful for someone else as well.


Error : \@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
17:c7:8f:e7:6b:09:87:9b:13:65:ac:2c:76:47:a8:69.
Please contact your system administrator.
Add correct host key in /home/madhura/.ssh/known_hosts to get rid of this message.
Offending key in /home/madhura/.ssh/known_hosts:17
RSA host key for 10.40.18.160 has changed and you have requested strict checking.
Host key verification failed.

Solution : 
Normally, our host keys are saved in "~/ssh/known_hosts”. 
1. Open this file and remove the line which is notifying the specific remote host key that you are getting trouble.

  •   Here it's good to turn on the Line Numbers in your text editor. Then it's easy to figure out which part to remove.
If you don't know how to remove that specific host key, then you need to,
2. Remove your known_hosts file. 
  • But then you lost your other remote host keys as well. However your SSH-Client will create a new "~/ssh/known_hosts” 
If you are prompting a warning that saying authenticity can't established and asking to continue, type "yes" and enter. 

Cheers...

Monday, January 2, 2012

Appcelerator Titanium Module Development for iOS

Appcelerator Titanium is a one of best cross-platform tools which is used for build Mobile applications. Currently it supports iOS, Android and Blackberry. Here I'm talking about some difficulties that I faced when using Appcelerator Titanium to build an iOS application, which used a native iOS module as well.


You can find the procedure to build a native iOS module for a particular Titanium project here. But there are some issues when we are following the steps as defined there. Followings are the solutions that I could able to come-up with and I was OK with them.

1.Issue :
    ".bash_profile" file does not exist


Solution: 
  • Start up Terminal
  • Type "cd ~/" to go to your home folder
  • Type "touch .bash_profile" to create your new file.
  • Edit .bash_profile with your favorite editor (or you can just type     "open -e .bash_profile" to open it in TextEdit)


2.Issue :
issues when Packaging the Module

Solutions :
  • Make sure that, to run this script from the terminal, you should in ~/tmp/test.
  •   The markdown2 module is not on the PythonPath by default for the Mac's pre-installed Python interpreter. So,
  1. Download the latest release from https://github.com/trentm/python-markdown2
  2. Unzip the resulting download
  3. Using the setup.py script in the directory that was created from expanding the zip file you downloaded, install with `sudo python setup.py install`
  4. Re-run build.py
3.Issue :

'ImportError: No module named markdown' when runs the build.py


Solution :

          You can fix this by editing the build.py in /Library/Application Support/Titanium/mobilesdk/osx/1.6.2/module/iphone/templates
Edit the line 53 and 57 with the appropriate markdown'X' that you have just downloaded.

Hope this will helpful for you. Cheers...!!!