Tuesday, December 14, 2010

Cygwin SSHD + Cron

Cygwin SSHD errors with RSA hostkey been changed:
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed. Click here for details.

Install cygwin cron
Get cron package from Admin group. Download cron from http://mirror.mcs.anl.gov and store it to your local drive. And then run /usr/bin/cron-config to setup cron daemon. Click here for details.

crontab -a filename  Install filename as your crontab file.
                    On many systems, this command is
                    executed simply as crontab filename
                   (i.e., without the  -a  option). 
crontab -e  Edit your crontab file, or create one if it
           doesn't already exist. 
crontab -l  Display your crontab file. 
crontab -r  Remove your crontab file. 
crontab -v  Display the last time you edited your crontab file.
          (This option is available on only a few systems.) 
crontab -u user  Used in conjunction with other options, this
                option allows you to modify or view the crontab
                file of user. When available, only administrators
                can use this option. 



Cygwin path to Windows path
$ cygpath -wp /home/oneuser/testdir
c:\cygwin\home\oneuser\testdir

Executing Java Program from Cygwin (bash shell script)
$ java -classpath `cygpath -wp $CLASSPATH` [classname] [arguments]

Uninstall Cygwin
source
# Restart your computer.
# Backup anything you may added to the c:\cygwin\ directory which will
not be replaced by the re-installation.
# Delete the c:/cygwin subdirectory (where Cygwin was installed).
# Remove registry entries: Any time you change the registry, do so with
great care..
  * Under HKEY_CURRENT_USER, Software, delete "Cygnus Solutions"
  * Under HKEY_LOCAL_MACHINE, Software, delete "Cygnus Solutions"
# Use Start, Run, cmd, chkdsk /F. This will run chkdsk, check and repair
any file system problems on the next bootup.
# Restart your computer.



No comments: