wget http://download_file --http-user=myusername --http-passwd=mypassword
Friday, July 31, 2009
wget with basic authentication.
Here's how you download a file from internet which is secured by basic authentication. Replace myusername, mypassword with your own username and password.
Wednesday, July 29, 2009
Hudson init script for Ubuntu 9.04
Hudson init script for ubuntu 9.04. This is available on hudson's website too.
http://wiki.hudson-ci.org/display/HUDSON/Installation+and+Execution
This is what worked for me. The one hudson website is for linux. This you can use as is without modifications (except for "RUN_AS") on ubuntu
http://wiki.hudson-ci.org/display/HUDSON/Installation+and+Execution
This is what worked for me. The one hudson website is for linux. This you can use as is without modifications (except for "RUN_AS") on ubuntu
#!/bin/sh
DESC="Hudson CI Server "
NAME=hudson
PIDFILE=/var/run/$NAME.pid
RUN_AS=sysadm
d_start() {
start-stop-daemon --start --quiet --background -m --pidfile $PIDFILE --chuid $RUN_AS --exec /usr/bin/java -- -Dhudson.scm.CVSSCM.skipChangeLog=true -jar /opt/hudson/hudson.war
}
d_stop() {
start-stop-daemon --stop --quiet --pidfile $PIDFILE
if [ -e $PIDFILE ]
then rm $PIDFILE
fi
}
case $1 in
start)
echo -n "Starting $DESC: $NAME "
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME "
d_stop
echo "."
;;
restart)
echo -n "Restarting $DESC: $NAME "
d_stop
sleep 1
d_start
echo "."
;;
*)
echo "usage: $NAME {start|stop|restart}"
exit 1
;;
esac
exit 0
Labels:
continuous integration,
hudson,
ubuntu
SSH without Password
I got information from this site
http://www.csua.berkeley.edu/~ranga/notes/ssh_nopass.html
SSH Without a Password
The following steps can be used to ssh from one system to another without specifying a password.
Notes:
* The system from which the ssh session is started via the ssh command is the client.
* The system that the ssh session connects to is the server.
* These steps seem to work on systems running OpenSSH.
* The steps assume that a DSA key is being used. To use a RSA key substitute 'rsa' for 'dsa'.
* The steps assume that you are using a Bourne-like shell (sh, ksh or bash)
* Some of this information came from:
http://www.der-keiler.de/Mailing-Lists/securityfocus/Secure_Shell/2002-12/0083.html
Steps:
1.
On the client run the following commands:
This should result in two files,
2.
3.
On the server run the following commands:
Depending on the version of OpenSSH the following commands may also be required:
An alternative is to create a link from authorized_keys2 to authorized_keys:
4.
On the client test the results by ssh'ing to the server:
5.
(Optional) Add the following $HOME/.ssh/config on the client:
This allows ssh access to the server without having to specify the path to the id_dsa file as an argument to ssh each time.
http://www.csua.berkeley.edu/~ranga/notes/ssh_nopass.html
SSH Without a Password
The following steps can be used to ssh from one system to another without specifying a password.
Notes:
* The system from which the ssh session is started via the ssh command is the client.
* The system that the ssh session connects to is the server.
* These steps seem to work on systems running OpenSSH.
* The steps assume that a DSA key is being used. To use a RSA key substitute 'rsa' for 'dsa'.
* The steps assume that you are using a Bourne-like shell (sh, ksh or bash)
* Some of this information came from:
http://www.der-keiler.de/Mailing-Lists/securityfocus/Secure_Shell/2002-12/0083.html
Steps:
1.
On the client run the following commands:
$ mkdir -p $HOME/.ssh
$ chmod 0700 $HOME/.ssh
$ ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P ''
This should result in two files,
$HOME/.ssh/id_dsa (private key) and
$HOME/.ssh/id_dsa.pub (public key).
2.
Copy $HOME/.ssh/id_dsa.pub to the server.
3.
On the server run the following commands:
$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys2
$ chmod 0600 $HOME/.ssh/authorized_keys2
Depending on the version of OpenSSH the following commands may also be required:
$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys
$ chmod 0600 $HOME/.ssh/authorized_keys
An alternative is to create a link from authorized_keys2 to authorized_keys:
$ cd $HOME/.ssh && ln -s authorized_keys2 authorized_keys
4.
On the client test the results by ssh'ing to the server:
$ ssh -i $HOME/.ssh/id_dsa server
5.
(Optional) Add the following $HOME/.ssh/config on the client:
Host server
IdentityFile ~/.ssh/id_dsa
This allows ssh access to the server without having to specify the path to the id_dsa file as an argument to ssh each time.
Labels:
ssh
HUDSON: THINGS TO REMEMBER [Skip Change Log]
While starting hudson use:
java -Dhudson.scm.CVSSCM.skipChangeLog=true -jar hudson.war
This makes sure that hudson skips computing change log. Computing change log option is
slow for one thing and caused a lot of problems while I was setting it up in our projects.
Labels:
continuous integration,
hudson
Saturday, July 11, 2009
Carnatic Music Website.
http://www.ecse.rpi.edu/Homepages/shivkuma/personal/music/index.html
Professor Shiv Kumar Kalyanaraman's carnatic music archive. Wonderful website for carnatic music.
Subscribe to:
Posts (Atom)