Saturday, October 16, 2010

webdav on linux windows

1.http://andres.jaimes.net/setting-up-a-webdav-server/
2.use webdav to rsync
http://forums.dropbox.com/topic.php?id=8957

apache virtual host

1.single machine -- running multiple web server simulation
follow
http://www.debuntu.org/2006/02/22/7-virtual-hosting-using-apache-2

2.directory access
http://www.cyberciti.biz/faq/apache-restrict-access-based-on-ip-address-to-selected-directories/
http://httpd.apache.org/docs/1.3/howto/auth.html#basic

git and ssh

1.initialize the git in git user login home ... link ssh public key with git home
2.it will create .gitosis.conf
3.next to clone gitosis-admin

Server
=====
install gitosis and git

Configuration
=============
create a user called git
give appropriate permissions to critical files
ensure .ssh folder

git unlike ssh uses gitosis-init to append public key(id_rsa.pub) to authorized_keys file(please remove the previous conflicting entries if any)

Client
======
use git clone to get the init files

follow http://www.hackido.com/2010/01/installing-git-on-server-ubuntu-or.html

At any point to reset
rm -r gitosis,repositories,.gitosis.conf

Creating a new repo
====================
in the gitosis-admin folder cloned initialially on the client there is the file gitosis.conf
Add entries for the new repo in it,note that the writable should have "folder(project)" name
Add group can be arbitrary
add this to remote using commit

follow the link
http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way

on any client use git clone git@localhost:test.git

ssh and localhost

server
/etc/init.d/ssh restart
/etc/ssh/sshd_conf
PermitRootLogin no

#RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys

ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication no

UsePAM no
AllowUsers git

Directory
=========
using adduser ..created user git
using sudo -u git -i ..logged in on the client as git

Permissions
===========
chown -R git:git /home/git/.ssh
chmod 700 /home/git/.ssh
chmod 700 /home/git/.ssh/id_rsa
chmod 700 /home/git/.ssh/id_rsa.pub
chmod 700 /home/git/.ssh/authorized_keys === id_rsa.pub

Debug
=====
/usr/sbin/sshd -d -p 54321
ssh -p 54321 -v git@localhost

Client
======
/etc/ssh/ssh_conf

creating and deleting user accnt

1.adduser ....user --interactive
2.userdel user
3.su -s -u user
4.useradd -- non interactive
5.passwd user
6./etc/adduser.conf
7.deluser user
8.difference of system and non system user

9.useful ssh
http://kimmo.suominen.com/docs/ssh/

10.a client server setup
11.need to start a ssh session with the server,as a user on the server
12.the user account needs private and public key
13.the client gets the public key and is used with the server
14.article
http://www.symantec.com/connect/articles/ssh-host-key-protection
15.ssh-add can be used to add keys to frequently used secure sessions
16.ssh-agent

17.ssh has a client d and server daemon
/etc/init.d/ssh restart

18.ssh checklist
http://ubuntuforums.org/showthread.php?t=231451
19.ssh test
http://sial.org/howto/openssh/publickey-auth/
20.#ChallengeResponseAuthentication no -- modification in /etc/ssh/sshd_conf
AllowUsers gitosis,git
21.whoami .....login commands
22.basics of shell
http://www.linuxfromscratch.org/blfs/view/cvs/postlfs/profile.html

23.sudo -u git -i .... resets the $HOME etc

24.sudo useful
http://www.freesoftwaremagazine.com/articles/command_line_intro

25.Each user needs to be at /etc/sudoers file..use visudo ...use passwd to change password

26.standalone testing openssh
/usr/sbin/sshd -d -p 54321
ssh -p 54321 localhost
http://docstore.mik.ua/orelly/networking_2ndEd/ssh/ch12_01.htm

sshd configuration

1.http://www.faqs.org/docs/securing/chap15sec122.html