Pages

Monday, July 11, 2011

Rsync on different port rather than 22

One day, I need to rsync between two Linux servers. And i have to know that only port 80 is opened between those. So use the following command so that rsync can use port 80 rather than 22.
#rsync -e "ssh -p 80" -avp /tmp root@remotehost:/tmp
Hope that somebody find this post useful.
Published with Blogger-droid v1.7.2

Wednesday, July 6, 2011

Sysloging To Remote Log Server on RHEL/CentOS

Purpose - Logging to remote log server instead of keeping log on locally for security reason.
In our case, we will send logs messages to a server with IP Address ( 192.168.1.2 )
How To
#vi /etc/syslog.conf
find the following line
*.info;mail.none;authpriv.none;cron.none                           /var/log/messages

change it to
*.info;mail.none;authpriv.none;cron.none                           @192.168.1.2

and restart the syslog server
#service syslog restart

May your logs be safe in peace! :D

Saturday, June 4, 2011

Default Folder Path For Screenshots On Mac OSX

Here shows how to change default file type of screenshots to JPG on Mac OSX. Another trick is how to change the default folder path that the captured screenshots are saved. Screenshots are saved on Desktop by default. I want to change it to "/Users/netlynker/Pictures/Screenshots". I type the following command in Terminal.

$defaults write com.apple.screencapture location /Users/netlynker/Pictures/Screenshots

I need to log out and log in again to make it affected immediately.
Now your screenshots will be saved in your preferred location in future.