deja vu

2014年4月10日星期四

svn+ssh setup

setup subversion with ssh
1. install subversion 
2. install cygwin with 'openssh', 'tcp_wrappers', 'zlib', and 'syslog-ng'
3. add system environment variable CYGWIN = ntsec tty, and add path to cygwin/bin
4. log in cygwin with administrator, run ssh-host-config, use privilege separation to automaticlly create cyg_server user in windows, yes to create local user, yes to install sshd as service, answer CYGWIN= "ntsec tty" as environment variable above.
5. edit /etc/hosts.allow, remove 'allow: PARANOID: deny', otherwise those host with unmatched address will be denied!
6. run syslog-ng-config, add following to log sshd information to separate log file
destination ssh {
        file("/var/log/sshd.log");
};
filter f_ssh {
        program("sshd");
};
log {
        source(s_local);
        filter(f_ssh);
        destination(ssh);
};
7. cygrunsrv -S sshd
and cygrunsrv -S syslog-ng
to start both services
7.5 create user 'svnuser' in windows for running the tunneling of subversion through ssh
8. clone windows user information to cygwin:
mkpasswd -cl > /etc/passwd
mkgroup --local > /etc/group
9. up to now, ssh should allow login, otherwise check log file at /var/log/message or /var/log/sshd.log
10. create ssh certificates: private key and public key two files
10.a use ssh-keygen or
10.b use puttygen.exe
11. append public.key to .ssh/authorized_keys
12. in clients, use putty to read the private.key file, in case of 10.a creation of key file, use puttygen to convert to the format for putty, save as key.ppk file, then set private key file for authentication in putty's Connection' SSH' Auth setting, set auto-login username to 'svnuser' the same in step 7.5
13. for safety, edit /etc/sshd_config to use pubkey login only, deny password login, deny empty password
PubkeyAuthentication yes
PasswordAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
14. key part, to add different users using same windows account to svnserve, add the following in addition to appended .ssh/authorized_keys, it actually sets the command to be excuted once the private/public key are matched for ssh login, and it tunnels svnserve through the channel.
command="svnserve -t -r --tunnel-user=",
         no-port-forwarding,no-agent-forwarding,no-X11-forwarding,
         no-pty ssh-rsa
this has to be one line, where ssh-rsa should be one line of concatenated public.key, can be any, is the name appeared in subversion commits, is the root path to repos.
15. in client machine, in order to access svn+ssh, you need the private.key, open putty, and create a session named 'somesession' (which is stored in registry of windows), configure it to proper ip address, add the path to private.key in Connection' SSH' Auth setting
16. in tortoiseSVN, check out svn+ssh://svnuser@somesession/repos, it actually can read the sessions configuration from putty to access the private.key to login, because tortoiseSVN use plink from putty to login

Enjoy the pain and have fun.

2008年12月12日星期五

gmail search operators























































































Operator Definition Example(s)
from: Used to specify the
sender
Example - from:amy

Meaning - Messages from Amy
to: Used to specify a recipient Example - to:david

Meaning - All messages that were sent to David (by you or someone else)

subject:

Search for words in the subject line
Example - subject:dinner

Meaning - Messages that have
the word "dinner" in the subject

OR


Search for messages matching term A or term B*


*OR must be in all
caps

Example - from:amy OR from:david

Meaning - Messages from Amy or from David
-

(hyphen)

Used to exclude messages from your search
Example - dinner -movie

Meaning - Messages that contain the word "dinner" but do not contain
the word "movie"
label: Search
for messages by label*

*There isn't a search operator for unlabeled messages
Example - from:amy label:friends

Meaning - Messages from Amy that
have
the label "friends"


Example - from:david label:my-family

Meaning - Messages from David that
have
the label "My Family"


has:attachment

Search for
messages with an attachment
Example -
from:david has:attachment


Meaning - Messages from David that have
an attachment
list: Search for messages on mailing lists

Example - list:info@example.com

Meaning - Messages with the words info@example.com in the headers, sent to or from this list


filename:

Search for an attachment by name or type

Example -
filename:physicshomework.txt


Meaning - Messages with an
attachment named "physicshomework.txt"


Example -
label:work filename:pdf


Meaning - Messages labeled
"work" that also have a PDF file as an attachment


" "


(quotes)


Used to search for an exact phrase*

*Capitalization isn't taken into consideration

Example -
"i'm feeling lucky"


Meaning - Messages containing
the phrase "i'm feeling lucky" or "I'm feeling lucky"


Example -
subject:"dinner and a movie"


Meaning - Messages containing
the phrase "dinner and a movie" in the subject


( )


Used to group words

Used to specify terms that shouldn't be excluded

Example -
from:amy(dinner OR movie)


Meaning - Messages from Amy
that contain either the word "dinner" or the word "movie"


Example -
subject:(dinner movie)


Meaning - Messages in which
the subject contains both the word "dinner" and the word "movie"


in:anywhere

Search for messages anywhere in Gmail*

*Messages in Spam and Trash are excluded from searches
by default
Example - in:anywhere
movie


Meaning - Messages in All Mail,
Spam, and Trash that contain the word "movie"

in:inbox

in:trash

in:spam

Search for messages in Inbox, Trash, or Spam
Example - in:trash
from:amy


Meaning - Messages from Amy that
are in Trash
is:starred

is:unread

is:read


Search for messages that are starred, unread or read
Example -
is:read is:starred from:David


Meaning - Messages from David that
have been read and are marked with a star

cc:

bcc:

Used to specify recipients in the cc: or bcc: fields*

*Search on bcc: cannot retrieve messages on which you were blind carbon copied
Example -
cc:david


Meaning - Messages that were cc-ed to David

after:

before:

Search for messages sent
during a certain period of time*

*Dates must be in yyyy/mm/dd format.
Example -
after:2004/04/16 before:2004/04/18


Meaning - Messages sent between April 16, 2004 and April 18, 2004.*
*More precisely: Messages sent after 12:00 AM (or 00:00) April 16, 2004 and before April 18, 2004.

is:chat
Search for chat messages Example -
is:chat monkey


Meaning - Any chat message including the word "monkey".

2008年3月12日星期三

竟然装了vista!

貌似这个windows live writer还能用

我是超级连接!

Humpback Whale

Forest Flowers Garden
Winter Leaves
地图图像

2008年3月1日星期六

哦~爸妈

obama~obama~obama~

2008年2月11日星期一

漫路 度月 无眠

漫路 度月 无眠

寒冬 踏雪 残痕

冷 冷 冷

2007年11月18日星期日

Hacker doomed to die alone

Hacker breaks rules, but obeys PRINCIPLE, no matter how ridiculous it seems.

Hacker adores mystery, but reveals UNKNOWN, no matter how complicated it appears.

Hacker keeps promises, but hates DISTRUST, no matter how accidently it happens.

They contradict, they convolve, they complement each other.

But,

People follow rules, people fear mystery, people forget promises.

That's how hacker doomed to die alone ironically and pitifully.

2BON2B

2007年11月9日星期五

The Day

Birthday!

Wish I could bring this happiness to you all ^O^

Thank you and

May God Bless The Especial You!

 
 

"Hang on to your hopes, my friend

Thats an easy thing to say, but if your hopes should pass away

Simply pretend

That you can build them again

Look around, the grass is high

The fields are ripe, its the springtime of my life"

--- Simon and Garfunkel <<Hazy shade of winter>>

搜索此博客

你每天睡几小时?

Google