Posted January 25, 2010 at 02:01am in
Security with tags Key Signing, PGP, PIUS, Security
Friday was my first time attending a PGP key signing party. We had it in one of the buildings on campus and I thought I would share some of the commands I used to handle all the certificates. I created a method for handling key signing parties while I did this one, but I think this is a fairly good method. What it basically does is keeps specific users in your pubring.gpg, while people at keysigning parties are in specific keyrings. When defining them in your gpg.conf file they will be included in all of your GPG operations so it will be like they were in your pubring.gpg keyring. It also means that if you don’t associate with anyone in the keysigning parting you can just comment out the file and still have the keys for later use or for archival purposes.
I first wanted to have these be in a specific keyring for the purposes of knowing who was at each keysigning. To make sure your key gets added to the keyring you need to specify not to use the default keyring and use a specific keyring.. Make sure you include your keyid in the list of keys to pull from the keyserver as it will be needed when PIUS runs against the specific keyring.
Continue reading
Posted January 18, 2010 at 02:01am in
Linux with tags Commands, Linux, Sys Admin
When I wrote the code to automatically generate aliases for hosts in my SSH config I started thinking about how checks are never done to verify we are not overriding an existing alias. This is my solution for it. I almost think that alias should be an alias for register_alias so that all aliases get checked, but I’m sure there could be an instance where it would break something. Let me know what you think about assigning aliases this way.
# .bash_functions
function register_alias() {
local alias=$(echo $* | cut -d'=' -f 1)
local TEMP_CMD=$(which $alias)
local TEMP_ALIAS=$(echo "`alias`" | sed 's/alias\ \(.*\)=.*/\1/' | grep ^$alias$)
if [ ${#TEMP_CMD} -gt 0 ]; then
echo "Alias $alias conflicts with command $TEMP_CMD"
elif [ ${#TEMP_ALIAS} -gt 0 ]; then
echo "Alias $alias conflicts with alias $alias"
else
alias "$*"
fi
}
# .bashrc
if [ -f ~/.bash_functions ]; then
. ~/.bash_functions
fi
# .bash_aliases
register_alias sls='screen -ls'
register_alias sdr='screen -d -r'
Update: I changed the TEMP_ALIAS line to use sed instead of cut/sed
Posted January 18, 2010 at 12:01am in
Linux with tags Linux, Sys Admin
There are some aliases and small scripts I use on a normal basis.
I prefer to just type in the machine I want to ssh to instead of typing ssh in front of it. This chunk of code goes in my ~/.bashrc file and creates an alias for each “Host …” entry in ~/.ssh/config. It checks to see if there is an existing command that matches the Host entry, and alerts you if there is a conflict
# Generate SSH aliases
for host in $(grep ^Host .ssh/config | sed s/Host\ //g); do
TEMP_CMD=$(which $host)
TEMP_ALIASES=$(echo "`alias`" | sed 's/alias\ \(.*\)=.*/\1/' | grep ^$host$)
if [ ${#TEMP_CMD} -gt 0 ]; then
echo "Alias $host conflicts with command $TEMP_CMD"
elif [ ${#TEMP_ALIASES} -gt 0 ]; then
echo "Alias $host conflicts with alias $host"
else
alias $host="ssh $host"
fi
done
When you open a terminal you will see something like this if you have conflicts.
Alias www conflicts with alias www
Alias hg conflicts with command /usr/bin/hg
Alias git conflicts with command /usr/bin/git
[20:05:21] manis@baron:~$
Continue reading
Posted January 12, 2010 at 02:01am in
Random with tags Cabinet, LTS, Ubuntu
Being without a desktop I fell a bit behind on what all was going on in a lot of areas, mainly because I wasn’t doing much outside of just my standard use and work. I just found out about Ubuntu’s Enterprise Cloud feature in Ubuntu Server 9.10. It looks very interesting, and I look forward to giving it a try. I am however unclear on how data is stored on disk, does it use parity, or store multiple copies? I wasn’t able to find much information on this.
I installed Lucid Lynx, the upcoming LTS release of Ubuntu. It is currently in its alpha stage, and when I get my desktop set back up I will reinstall to Lucid Lynx. The performance was suffering greatly running in a VM on my laptop, I really want to see how it will perform with the SSD.
I am really unsure what I want to do with my cabinet. I certainly don’t want to sell it, but it is taking up significant space and I don’t have use for much of the equipment right now. If I end up not getting a roommate I can put it in the 2nd bedroom in a couple months, but for right now I have it sitting in the living room, and it is taking up more space than I’d like.
Well thats all the randomness I can go on about right now. I’m tired, and my back hurts and I haven’t been doing much outside of work.
Posted December 23, 2009 at 05:12am in
Linux with tags Apache, Cherokee, Web Server
I just finished moving everything over to Cherokee and thus far I am really enjoying it. It has a built in Admin interface that handles graceful restarts, a long long list of features, and from what I have read it has very good performance.
Right now I am talking with some people about the very interesting MySQL bridge integrated in Cherokee. The bridge allows you to send commands in a language and have it returned in the same language. So you can use Ruby, Python, JSON or PHP to send your SQL command and you will get your results back in the same language. There is built in media streaming support, built in SSL/TLS, support for FastCGI, SCGI, uWSGI, and tons more stuff.
I encourage you to check it out. I will definitely be posting more about Cherokee in coming weeks when I test out the MySQL bridge and compare it to the performance with the MySQL module for Python.
Posted September 5, 2009 at 08:09pm in
Linux
This won’t be long, I just want to go over a couple things about Chrome on Linux. So first off, its fast, super duper fast. I am running Chrome on 64bit Ubuntu 9.04 with a SSD and Chrome starts up faster than pretty much anything else.
If you aren’t able to get your GTK theme to work apply one of the other themes available, and then select use GTK theme.
Also if you want to enable Flash do the following
$ sudo updatedb
$ locate libflashplayer.so
$ mkdir /opt/google/chrome/plugins/
$ cp [insert libflashplayer.so location here] /opt/google/chrome/plugins/
Now change the shortcut for Chrome to
/opt/google/chrome/google-chrome --enable-plugins %U
Enjoy the speed and smoothness that is Chrome.