2012年3月27日星期二

3 Steps to Perform SSH Login Without Password Using ssh-keygen & ssh-copy-id

1. ssh-keygen -t rsa
## will generate id_rsa and id_rsa in ~/.ssh folder
2. ssh-copy-id -i ~/.ssh/id_rsa.pub remote_server
## copy the public key to the remote server
3. ssh remote_server
## check if it runs correctly

2012年3月8日星期四

Changing PDF Metadata on Linux

Recently, I found something in pdf title was really annoying. I decided to find out a way to change it and some other information. I came to a program called PDFTK. The first thing we need do is to extract the pdf information:
pdftk example.pdf dump_data output info.txt 

Then edit info.txt to like the following:
InfoKey: Title
InfoValue: New
InfoKey: Author
InfoValue: zhanlu
InfoKey: Subject
InfoValue: changed


Finally, update the pdf information

pdftk example.pdf update_info info.txt output new.pdf