Tuesday, July 19, 2005

Different View Points.

Here is lots of words to say. I am in a very sad mood. Since from yesterday I am not able to decide weather its my right decision to join this organization or not. Slowly its making me sence that I am in wrong position and also on wrong place. People call this place a heaven on earth but slowly its becoming a hell for me.

But suddenly I received an very good mail from one of mine best friend. I am enclosing those words here too. Seems that I am not able to coup up with the changing environment or other thing is that the changed environment is not good. It might be right from both the perspective. Its much more like the discussion of half filled glass betweens two drinker. Both of them are right at their place. One is saying that its half empty because he does not want to share any more. Another is saying that its half filled because he wants to take sip from that glass. Now its difficult to say who is right. Both are correct at their point of view.

In more depth Imagine you're in London's Heathrow Airport. While you're waiting for your flight, you notice a kiosk selling shortbread cookies. You buy a box, put them in your traveling bag and then you patiently search for an available seat so you can sit down and enjoy your cookies.Finally you find a seat next to a gentleman. You reach down into your traveling bag and pull out your box of shortbread cookies.

As you do so, you notice that the gentleman starts watching you intensely. He stares as you open the box and his eyes follow your hand as you pick up the cookie and bring it to your mouth. Just then he reaches over and takes one of your cookies from the box, and eats it! You're more than a little surprised at this. Actually, you're at a loss for words. Not only does he take one cookie, but he alternates with you. For every one cookie you take, he takes one.

Now, what's your immediate impression of this guy? Crazy? Greedy? He's got some nerve?! Can you imagine the words you might use to describe this man to your associates back at the office? Meanwhile, you both continue eating the cookies until there's just one left. To your surprise, the man reaches over and takes it. But then he does something unexpected. He breaks it in half, and gives half to you. After he's finished with his half he gets up, and without a word, he leaves. You think to yourself, "Did this really happen?" You're left sitting there dumbfounded and still hungry. So you go back to the kiosk and buy another box of cookies. You then return to your seat and begin opening your new box of cookies when you glance down into your traveling bag. Sitting there in your bag is your original box of ookies -- still unopened.

Only then do you realize that when you reached down earlier, you had reached into the other man's bag, and grabbed his box of cookies by mistake. Now what do you think of the man? Generous? Tolerant? You've just experienced a profound paradigm shift. You're seeing things from a new point of view. Is it time to change your point of view?

Now, think of this story as it relates to your life . Seeing things from a new point of view can be very enlightening. Think outside the box. Don't settle for the status quo. Be open to suggestions. Things may not be what they seem.

Tuesday, July 12, 2005

Secure Connectivity through SSH

First Two Para for only those who know what kind of work we are doing currently other people may not be able to understand what I am saying. If it so please leave first two para.
Since from when I am working in this project I am searching some appropriate solution for establishing the secure connection on internet. From very first day I am not able to understand the solution which looks totally ugly and stupid for me (file transfer over https connection). Ultimately I am able to do the thing which I wanted to do. This happened because on of my friend as me for some thing through the news group and I analyzed that its good for me.
Because when ever I suggest some thing good the question always comes we can not go against the clients sec policy. And in that term its seems good solution. Although I am still not able to use this solution (Because we can not go against the client sec policies where ssh is allowed still ....)but might be it help u people.

SSH is an extremely useful tool in that it allows you to do many things in a secure fashion that you might not otherwise be able to do. One of the things SSH allows you to do is to set up a reverse encrypted tunnel for data transfer. Typically, when you initiate an SSH tunnel, you forward a port on the local machine to a remote machine which can allow you to connect to an insecure service in a secure way, such as POP3 or IMAP. However, you can also do the reverse. You can forward a port on the remote machine to the local machine while still initiating the tunnel from the local machine.

This is useful if you have a service on the remote end that you want to have connected to something on the local machine, but you don't wish to open up your firewall or have SSH private keys stored on the remote machine. By using a reverse tunnel, you maintain all of the control on the local machine. An example which I took is for forwarding logging messages; by setting up a reverse SSH tunnel, you can have a logger on the remote system send logs to the local system (i.e., syslog-ng).

To set up the reverse tunnel, use:

$ ssh -nNT -R 1100:local.keekar.com:1100 remote.keekar.com


Let me explain what this does. Is initiate a connection to remote.keekar.com and forwards TCP port 1100 on remote.keekar.com to TCP port 1100 on local.keekar.com.
The "-n" option tells ssh to associate standard input with /dev/null,
"-N" tells ssh to just set up the tunnel and not to prepare a command stream, and "-T" tells ssh not to allocate a pseudo-tty on the remote system.

These options are useful because all that is desired is the tunnel and no actual commands will be sent through the tunnel, unlike a normal SSH login session.

The "-R" option tells ssh to set up the tunnel as a reverse tunnel.

Now, if anything connects to port 1100 on the remote system, it will be transparently forwarded to port 1100 on the local system.

Please dont forgot to send me ur views abt this approach.

Sunday, July 03, 2005

Automated FTP File Transfer from Unix

Hi KK,

You can use this document to script an FTP file transfer. The basic idea is shown here.
ftp -i -v -n ftp.keekar.com  (redirector} end_ftp

user keekar mypassword
binary
lcd /scripts/download
cd /scripts
get auto_ftp_xfer.ksh
bye

END_FTP

Friday, July 01, 2005

Scheduling FTP to FTP Server in Windows

This example will use built-in features of Windows, so no additional software is needed. One feature is the "Scheduled Tasks" Control Panel and the other is the executable program FTP.EXE.

Part I - Creating the FTP script
FTP scripts automate the process of using FTP servers like ftp.keekar.com. The script file is just a list of FTP commands saved in a standard text file.

1. Open Notepad
2. Copy and paste this template script into the new Notepad document:

open ftp.keekar.com
username
password
prompt
passive
cd files/backup_directory_name/
lcd "C:\Path of local directory to backup"
mput *.*
bye

3. Replace username on line 2 with your ftp server username.
4. Replace password on line 3 with your ftp server password.
5. Replace backup_directory_name in line 6 with the name of directory in your ftp server to which you wish to your files.
6. Replace "C:\Path of local directory to backup" in line 7 with the path to the directory on your local computer that contains the files you wish to backup. As shown in the example, you will need to enclose the entire directory path in quotes if it contains any spaces. A typical path may look like:
"C:\Documents and Settings\JohnDoe\My Documents"
7. Replace *.* in line 7 with a list of files you wish to backup (within the directory you just specified in step 6). If you leave line 7 unchanged, all files contained in the directory will be uploaded. Please note that the contents of any further subdirectories will not be included.
8. Save the FTP script and exit Notepad. A good name and location for it might be:
C:\keekar_backup_script.txt
9. If you are interested to do binary transfer then introduce bin prior to mput.

Part II - Scheduling the script to run at certain times

1. Open the "Scheduled Tasks" Control Panel.
2. Chose "New > Scheduled Task" from the "File" menu.
3. Type a name for the task. A good name might be: Keekar Backup
4. Double-click the new task.
5. In the field labeled "Run:" type:
C:\WINNT\system32\FTP.EXE –s:C:\keekar_backup_script.txt
(If you choose a different name or location for your FTP script is step 8 of Part I, you'll need to replace C:\keekar_backup_script.txt with the full path to the script.)
6. In the field labeled "Start in:" type:
C:\WINNT\system32
7. Click the "Schedule" tab.
8. To schedule the backup to occur every day at midnight, you would set the drop-down menu labeled "Schedule Task:" to Daily, and the field labeled "Start Time:" to 12:00 AM.
9. Once you have choosen your schedule, click the "Okay" button.
10. Close the "Scheduled Tasks" Control Panel.

If you know little bit about the batch scripting then u can perform lots of other things too. Like checks for files availability, monitoring the time taken by each transfer etc.