Convert .sh file into .exe file

Currently im using putty to execute .sh file.
This file is currently saved onto a server.
The .sh file tries to get files from other server and load the files into the current server.

Now i want this .sh file to run as an .exe file on my desktop.
So that by just double clicking the file and by giving the server's username and password, the file can be executed.

Is this possible to do????

Since you say .exe, I'm assuming you use Windows.

You can create a batch file which uses plink to do so. It's just like putty except non-graphical, designed to be automated.

Hi,
bat file works for any cmd commands.
but in my case i have to connect to servers to get the data.
and i connect to the server using putty.

so if you can tell me how to make bat file that can connect to any server and get data and execute commands.

PUTTY is graphical. It cannot be automated that way. You could do it on the server side, perhaps -- preparing a special account for putty to log into, complete with ssh keys so putty can login passwordless, whose profile goes direct to the scripts you wish to run, etc. Double-clicking on the right profile would put you straight in.

If you cannot do that and must script it on the client side, that's why the same project which made putty also made the plink utility, which can be automated.

C:\Documents and Settings\User>plink
PuTTY Link: command-line connection utility
Release 0.61
Usage: plink [options] [user@]host [command]
       ("host" can also be a PuTTY saved session name)
Options:
  -V        print version information and exit
  -pgpfp    print PGP key fingerprints and exit
  -v        show verbose messages
  -load sessname  Load settings from saved session
  -ssh -telnet -rlogin -raw -serial
            force use of a particular protocol
  -P port   connect to specified port
  -l user   connect with specified username
  -batch    disable all interactive prompts
The following options only apply to SSH connections:
  -pw passw login with specified password
  -D [listen-IP:]listen-port
            Dynamic SOCKS-based port forwarding
  -L [listen-IP:]listen-port:host:port
            Forward local port to remote address
  -R [listen-IP:]listen-port:host:port
            Forward remote port to local address
  -X -x     enable / disable X11 forwarding
  -A -a     enable / disable agent forwarding
  -t -T     enable / disable pty allocation
  -1 -2     force use of particular protocol version
  -4 -6     force use of IPv4 or IPv6
  -C        enable compression
  -i key    private key file for authentication
  -noagent  disable use of Pageant
  -agent    enable use of Pageant
  -m file   read remote command(s) from file
  -s        remote command is an SSH subsystem (SSH-2 only)
  -N        don't start a shell/command (SSH-2 only)
  -nc host:port
            open tunnel in place of session (SSH-2 only)
  -sercfg configuration-string (e.g. 19200,8,n,1,X)
            Specify the serial configuration (serial only)

C:\Documents and Settings\Username>type test.txt
echo "Hello World"
hostname

C:\Documents and Settings\User> plink.exe -batch -m test.txt -pw mypassword User@hostname
Hello World
mecgentoo

C:\Documents and Settings\User>