Archive

Archive for September, 2008

Dell Precision M4300 Suspend/Resume problem resolved (Ubuntu 8.04)

September 13, 2008 Leave a comment

I’ve had hibernate working from day one, but suspend never quite worked properly. With a few tweaks that I found on this page, I have it suspending on shutting the lid and resuming on open. It takes a little longer than I’d prefer to resume, but it is fine.

Advertisements
Categories: linux, ubuntu

Repair Grub startup problems quickly and easily

September 7, 2008 Leave a comment

After hosing Grub settings on my main machine, I stumbled onto one of those tools that just blew me away.

Super Grub boot disk is small, quick and easy. You just download and burn it to a CD, boot from the CD, and follow along with the excellently written documentation wiki. It took me less than 10 minutes start to finish to be back up and running, and as a side benefit found a good reference about boot loaders.

Categories: linux, Software

SSH Sessions with no password

September 7, 2008 1 comment

This was adapted from here.

The basic idea is that in the crypto system that ssh uses (RSA or/and DSA)  the encryption and  decryption are done using different keys. Basically, what the user (client) needs is to generate a public/private key pair. The server will know the public key, but only the client will know the private key. When the client connects to the server, it  tells its own public key. If this key is allowed (if it is between the known public keys list on the server), the server will send a randomic number to the client. This encrypted number can only be decrypted if the appropriate decryption key is used, and this decryption key is the client’s private one. The client then uses then its own private key and decrypt the number. If this is done correctly, the server will grant the access with no more questions. As you can see the system is safe, because the client never tells anybody about its private key; and this key cannot be inferred using the public one.

What must be done is to generate a public/private key pair, and copy the public part into the appropriate place on the server side.

Step by step instructions:

On the user’s home directory, on the client machine, type

local> ssh-keygen -t dsa -f .ssh/id_dsa

-t tells the type of encryption
-f tells where to store the public/private key pairs. In this case, the .ssh directory on home is being used

A password will be asked; leave this part blank, just pressing <enter>
Now, go the .ssh directory, and you will find two new files: id_dsa and id_dsa.pub. The last one is the public part. Now, copy the public key to the server machine

local> cd .ssh
local> scp id_dsa.pub user@remote:~/.ssh/id_dsa.pub

Of course, this time you will need to enter the password.
Now, login into the server machine and go to the .ssh directory on the server side

local> ssh user@remote
remote> cd .ssh

Now, add the client’s public key to the know public keys on the server

remote> cat id_dsa.pub >> authorized_keys2
remote> chmod 640 authorized_keys2
remote> rm id_dsa.pub

remote> exit

That’s all.
Next time you log into the remote server, no password will be asked!

Combined with the gnome sshmenu applet, this can be a real time saver.

Categories: linux, networking, Software, ubuntu

IAX2 trunking trixbox Pro servers

September 7, 2008 2 comments

This is to complement my most popular post, from 2 years ago, which is about trunking two freePBX servers. It is even easier to trunk two trixbox Pro servers and set up 4 digit dialing.

Example:

server 1 ID: 1231000  has 7xxx extensions. Extensions dialed 6xxx will go to server 2

server 2 ID: 3212000 has 6xxx extensions. Extensions dialed 7xxx will go to server 1

Substitute your server ID numbers where applicable

SERVER 1 SETTINGS:

From server 1 control panel, go to the Options:voip page. Add a voip account with the following settings:

Provider: Other, IAX2

Route Name: 3212000

Username: leave blank

Password: leave blank

Register: No

Server: s3212000x.trixbox.fonality.com

Click Add Voip Account, and acknowledge the dire warning.

go to the Options:dial plan page.

Add a new dial plan:

Prefix: 6

dial string: xxx

Description and Type: optional

Route: VoIP: 3212000

Strip Digits: 0

Prepend: 000 (VERY IMPORTANT)

Click Add Dial Plan

SERVER 2 SETTINGS:

From server 2 control panel, go to the Options:voip page. Add a voip account with the following settings:

Provider: Other, IAX2

Route Name: 1231000

Username: leave blank

Password: leave blank

Register: No

Server: s1231000x.trixbox.fonality.com

Click Add Voip Account, and acknowledge the dire warning.

go to the Options:dial plan page.

Add a new dial plan:

Prefix: 7

dial string: xxx

Description and Type: optional

Route: VoIP: 1231000

Strip Digits: 0

Prepend: 000 (VERY IMPORTANT)

Click Add Dial Plan

You now should have 4 digit dialing between servers.

Categories: Asterisk