Tuesday, April 28, 2009

passwordless SSH Log in and even more secure

Suppose you want to log into your office computer very often from home computer. Its very annoying to enter password each time you open a terminal or new window in terminal. Thus I searched a bit and found a procedure to bypass entering password. And it happens to be more safer way that entering password.

1.On your Home-comp
ssh-keygen -t rsa

This will generate ~/.ssh/id_rsa.pub file

2.
cat ~/.ssh/id_rsa.pub | ssh office-user@office-comp "cat >> ~/.ssh/authorized_keys"


This will ask you password for one last time. Note that we have used cat command over ssh. Hence we will require the password at least once.

Make sure that you have following permissions on "office-comp" :
chmod 750 ~
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

Monday, April 27, 2009

Getting CD-ROM info in linux

I wanted to burn a DVD( Ubuntu :D) but my machine does not have DVD RW. I thought one of the server might have it, so I needed to check them. The problem is all servers are without X, so I needed some command to get that info. After Googling a bit I found some useful files.

/proc/sys/dev/cdrom/autoclose
/proc/sys/dev/cdrom/autoeject
/proc/sys/dev/cdrom/check_media
/proc/sys/dev/cdrom/debug
/proc/sys/dev/cdrom/info
/proc/sys/dev/cdrom/lock

All the files are readable by all and produce ASCII output when read. They reflect the current state of the CDROM subsystem. This location is part of the procfs's window through to the sysctl configuration mechanism (see man sysctl). All but info are writable by the superuser. There is a column for each CDROM and DVD player in the system in info (not just SCSI devices).

As an example, the auto eject feature can be turned on by the superuser with the command echo "1" > /proc/sys/dev/cdrom/autoeject. This will cause cdroms to be ejected from the drive when unmounted.

Sunday, April 26, 2009

NYU wireless/VPN on linux

I use Fedora on my laptop and I had tough time configuring NYU wireless in it. I found three procedures, of which I tried hard with the first one but Couldn't get it working. It was for Ubuntu but I thought I might give it a try. Here it is.

Approach 1 :
First off you'll need to get the Verisign Root CA certificate:
1.Go to https://getca.verisign.com/ and download the current Root CA Certificate. It downloads for me as 'getrootcert.cer'.
2.Convert the .cer file to a .pem file:
openssl x509 -in getrootcert.cer -inform d -out verisign.pem

3.Save verisign.pem wherever you want (/etc/ssl/certs would make sense).
4.You need to go to the network manager (usually on the top bar) where you select wireless networks, click the left mouse button and select 'connect to other wireless network'.
5.Select 'WPA2 Enterprise' for a 'Wireless Security', and a whole bunch of new options will appear.
Network Name is 'nyu'
EAP Method is PEAP
Key Type: Automatic (or, I believe AES)
Phase2 Type is MSCHAPv2
Identity is you NYU NetID (eg. js123 -- don't include the @nyu.edu )
Password is your NetID password.
Anonymous Identity, Client Certificate File, Private Key File, and Private Key Password should be left blank.
6.For CA (Certifying Authority, I guess) Certificate file use the verisign.pem file.
It should work fine.



Approach 2:(NYU VPN)

After a while I found second one.I got this thing working in first attempt but the problem is we never know when will NYU-ITS will shut off NYU-Roam3.Here is the procedure.

1.Connect to NYU-ROAM3.
2.Create a VPN connection using cisco VPN.
3.Gateway : vpn.nyu.edu
4.Group name : nyu-vpn
5.User password : NYU net ID password
6.Group password : nyu-net
7.User : NYU net ID

For ubuntu:
Install vpnc and network-manager-vpnc using synaptic first.



Approach 3:

Simplest of all.
1. Get guest username and password from library.
2. Connect to NYU-GUEST.
3. Put that username and password.

But dont get too excited, this user name and password is changed every Monday.

Friday, April 24, 2009

LaTeX Introduction

Here are some LaTeX resources that I've found useful:




Monday, April 20, 2009

Becoming invisible in Pidgin on Gmail

1. Open the Buddy List.
2. In the menu, Tools->Plugins. Enable XMMP Console. Close the Plugin Window
3. In the menu again, Tools->XMMP Console->XMMP Console.
(See if your account in which you want to go invisible is selected if you have multiple accounts. )
4. In the text box, put the following XML snippet

{{{
<presence>
<priority>5</priority>
</presence>
<presence type="unavailable">
<priority>5</priority>
</presence>
}}}

and then press enter.
5. Done this is it. If this is not working on your version, now try changing the status to Invisible.

Finally, if you want to reset the above settings. Follow the same procedure but make < presence type="available" > in the above XML snippet.