Thursday, August 23, 2012

Trace your python programs

Bash programming has a very helpful command of:

bash -x myscript.sh

This will show you what bash is doing while running through myscript.sh. Python has the same functionality, through this command:

python -m trace --trace myscript.py 

Very useful in debugging python programs.  Additional info:

http://docs.python.org/library/trace.html


Friday, August 3, 2012

Create ssh public key from private key

If you have a private key and want to create the public key from that (to put in ~/.ssh/authorized_keys, for example), do the following:

ssh-keygen -f <my_private_key> -y > <my_public_key>

For example:

ssh-keygen -f ~/.ssh/id_rsa -y > ~/.ssh/id_rsa.pub


If you are using this to ssh with keys, add my_public_key (eg. ~/.ssh/id_rsa.pub) to ~/.ssh/authorized_keys on the remote server.

Then ssh with the private key to the remote server to test.


Monday, May 14, 2012

EC2 Bundling an AMI -- Server.InternalError: An internal error has occurred


Once you try to re-bundle an OS image that has been previously bundled, it will complain about /etc/ec2/amitools/cert-ec2.pem not being present.  I figured that was my certificate, but it is  EC2's X.509 public key certificate, not mine (docs are somewhat confusing about that).  Since they were stripped out of the AMI last time it was bundled, I reinstalled the tools to restore these certs and no errors any more.

AWS API tools:

http://aws.amazon.com/developertools/368

Hope this helps.

Original EC2 forum posts:

https://forums.aws.amazon.com/thread.jspa?messageID=345021

https://forums.aws.amazon.com/message.jspa?messageID=344101


Wednesday, April 25, 2012

Tuesday, March 27, 2012

Install Cisco AnyConnect on Ubuntu/Debian/Mint 64 bit

Looks like there are no 64 bit Cisco AnyConect VPN Clients.  Here is a workaround to get them working on a Debian-based 64 bit OS:

http://www.virtualcorner.nl/?page_id=220

Monday, March 26, 2012

Linux Mint on Gigabyte GA-Z68X-UD3H-B3

I tried to install Linux Mint on a desktop with Gigabyte GA-Z68X-UD3H-B3 motherboard with its Intel raid array configured with two of three hard drives.  I wanted to install Linux Mint 12 x64 on the third drive.  When trying to boot, I got the error message:

udev timeout killing /sbin/modprobe -bv pci:

I had to add the grub option of nomodeset as a kernel paramater.  It then was able to install from there.  Here are more details:

http://forums.linuxmint.com/viewtopic.php?f=46&t=95351&p=547012#p545731

Thursday, February 23, 2012

pv

This was so good I had to repost it here.  It is about a useful utility called pv which shows a progress report of running processes:

http://www.dp.cx/blog/pv--one-of-the-most-useful-applications-around.html