pithed.org » computers

computers


Want to increase convenience at the potential expense of security? Don’t we all. Well here’s how to authenticate without passwords*, and make aliases for your hosts while you’re at it.

First of all let me get that * out of the way. While it is possible to set up ssh logins with no password at all using this method, I recommend using a password when creating your key pair. This will give one master password shared between all logins that only needs to be entered once per session.

First of all you need to create a public/private key pair. I’ll assume you haven’t already done this.

user@machine:~$ ssh-keygen -t dsa -f ~/.ssh/id_dsa

It will prompt for a password. You should use one here, and use this key pair for several hosts. This would give the same password across all of the hosts. Or, you can just leave it blank. If you do that, then if anyone gets your private key file, they can access all of the servers that have your public key file. So especially if you leave the password blank, protect your private file!
You should now have 2 files in .ssh/. One will be your private key (id_dsa) and the other will have a .pub extension.

Now,
user@machine:~$ scp ~/.ssh/id_dsa.pub user@remote_host:.ssh/

Then log into the remote host,
user@machine:~$ ssh anotheruser@remote_host

And move the key into the authorized_keys file
anotheruser@remote_host:~$ cd .ssh
anotheruser@remote_host:~/.ssh$ cat id_dsa.pub >> authorized_keys2

And set the file permissions, if the file didn’t already exist.
anotheruser@remote_host:~/.ssh$ chmod 640 authorized_keys2

and delete the .pub file
anotheruser@remote_host:~/.ssh$ rm id_dsa.pub

You can now log out of the remote host. Try logging in again, it should just ask for the master password. For subsequent logins, no password should be needed.

Now, how about setting up an alias for the host name, and having SSH remember your login name? On the local system open the ~/.ssh/config file. Create it if necessary. Simply set up the aliases like this:

Host mybox
User anotheruser # remote login, if different
Hostname mybox.somedomain.com

Host anotherbox
Hostname anotherbox.anotherdomain.org

Once this is all set up, you should be able to ssh mybox, and the system will automatically select user name ‘myname’ and use the DSA key pair instead of a password.

picture unrelated

Just came across this excellent list of keyboard shortcuts for linux. Definitly worth a look.
linkage

Well, after playing with water cooling off and on for a couple years, I’ve finally gotten sick of it. I had a system that worked well for a while, but then my pump died. Good pumps are expensive, and the cooling system just seemed to be a sink for money. I decided to switch to air. I searched google for the best of the best of heatpiped heatsinks. I found most reviews rate the thermalright ultra 120 as one of the best. I noticed it would allow me to use my own 120mm fan, which I already had for my radiator, so I bought it. First off, this thing is BIG. Really big. Just look at it.

thermalright ultra 120 installed on a board

I didn’t think to take a pic of it, so I lifted this one from www.overclockersonline.net.

Either way, this beast looks impressive. So impressive in fact that I thought it might have similar performance to my water system. The sink is half the size of my radiator, and its directly connected to the cpu. Sounds like a good plan.

My dreams started getting crushed when I went to install this piece. According to the instructions it just bolted to the standard backplate that comes w/ ones motherboard. It definitly didn’t. The bolts supplied were far too short. In the end I had to use the backplate and nuts from my waterblock to get it installed. The stock Thermalright hardware also only allows for a top-to-bottom layout on 939 boards. I was under the impression I could have a front-to-back layout, so it would blow the hot air right out the back of the case. Overall not very impressed.

I finally managed to get the door on my case to shut (I had some clearance issues), and started doing some testing. The result? Absolutely terrible performance. I don’t know if water jaded me, or if this thing is just a POS. I get ~40c idle, and ~50c load on an A64 4000+ 939 San Diego core. Maybe I mounted it wrong? I remounted the sink 4 times trying both arctic silver 5 and the supplied compound, cleaning with alcohol in between. I still haven’t managed to get the temps down. I guess air cooling just isn’t that impressive.

I just received a letter from one Domain Registry of Canada, informing me that my domain was soon to expire (its renewed now. no stealing for you, bitches). This letter looked very much like a bill, and offered to extend my domain registration for a while. The problem? I use dreamhost. A quick skim through the document is enough to see that it is not in fact a bill, but I must wonder how many people fall for this scam. It seems like others have been recieving these as well.

Maybe I’m an idiot to have thought this was a bill for even a short moment, but with the outrageous rates that this company charges, I’m sure they’re making a killing from the few responses they do get.

Bastards.

I’ve recently wanted to rip some CDs to several different formats at once. Say a FLAC copy for the computer, and an mp3 for the portible. After some searching, Abcde (A Better CD Encoder) seems to be the best package on linux for this. It is based around a bash script that will do CDDB lookups, and then use cdparanoia to rip the files, and encode them in your chosen formats.

$abcde -o mp3,flac,ogg

Its as easy as that. You’ll have to change the settings in the config file. Its located at /etc/abcde.conf (obviously..). I uncommented and changed these:

LAMEOPTS=’-V 0′

OGGENCOPTS=’-q 6′

To set mp3 encoding at alt-preset-extreme, and ogg encoding at Q6.

I have also edited a little bash script I found. It’s available here. When run, it will make .m3u files for all mp3s in the current directory and all subdirectories. Just put it in your path.

Lately I’ve been trying to smooth out my linux experience, as I’ve had the same system running for long enough that it seems worthwhile. One of the things thats always been a bit shaky is the use of my iPod. I’ve recently got ejecting to work well, but to make the amarok integration slicker I wanted a /dev/ipod entry. So, to do this

Make an entry in /etc/udev/rules.d/00.rules along the lines of

##iPod
BUS=”scsi”, SYSFS{model}=”iPod*”, NAME=”ipod%n”

This will search all new devices, and if their model matches iPod it puts them at /dev/ipod[n] with n being the partition number.

Over the past few weeks I’ve been getting annoyed with the distributed.net client while doing cpu intensive things. Its easy enough to su, /etc/init.d/dnetc stop.. but even that can get to be a bit much. I figured an icon would be much nicer. The issue then, is allowing me as a regular user to operate init.d scripts.

Now I’ve tried using chmod+s before and had some success, but it didn’t seem to be working here, plus thats not really the right way of doing it. It turns out configuring sudo for this task is really simple.

Simply type a

visudo

And you’ll see the /etc/sudoers file (must use visudo though..)

I then added

User_Alias RANDOM = random

and

Cmnd_Alias CMD_DNETC = /etc/init.d/dnetc

Then gave myself the permissions with the following entry

RANDOM ALL = NOPASSWD: CMD_DNETC

Obviously the aliases weren’t required in this simple configuration, but I figured I might as well do it right, as I’m sure I’ll start to use this more now that I know how. The NOPASSWD option makes it so sudo doesn’t ask me for my user password (how useless would that be?). Now I can run the command as a user by simply typing (or pointing an icon to)

sudo /etc/init.d/dnetc

Works like a charm.

Well the random X.org crashes seem to have topped after I urpmi’d some updates. I really have to give it to the people at Seer Of Souls, as their repository is top notch and updated quite frequently.

If you didn’t know, seer of souls is an independant site that supplies software for the current version of Mandriva Linux. Most of their software is backported from Cooker (the beta version of Mandriva). Its an excellent way to get up to date software without having to resort to compiling from source.

This is especially useful if you don’t leave it on as one of your primary sources. This is pretty important as urpmi doesn’t make downgrading easy. In fact from what I can tell, it’s damn near impossible. So if you add seer of souls, think before you do a ‘urpmi –auto-select’ and update everything - you could regret it.

Well as a way of wasting time instead of studying for calculus, I did some reading up on how to install linux on my ipaq.

It didnt go well.

While trying to back up the ROM I borked it so now it won’t reboot. Removing the battery also doesnt seem to be hard resetting it due to the damned auxiliary battery. I wonder how long it lasts….

edit:

Well apparently running the update software works to fix it. I already had the newest firmware, but I re-updated anyway. That got it working as usual.

Linux will have to wait for now :/