Wednesday, 3 November 2010

Lets Talk : Unix to VBA

I had always wondered if i could some how skip the PUTTY screen for my basic task like runing some custom scripts at my work or if possbile i could bring them to a better world of windows push button technology. And more i wanted it in excel using VBA.

The solution to my problem was partly to a major extent aswered by PLink. This tool allowed me to act as a brigde to communicate to unix via batch script file. And with Excel VBA i can easily create them on fly. Hence forth i landed with this peice of solution i have provided as intiation of the project which could be developed as desired. This tool is ammendable as required to be used with .NET solutions as well.

A good help for the PLINK tools is avilable at Link.

A quick guide for the command list for PLINK:

'Z:\sysosd>plink
'PuTTY Link: command-line connection utility
'Release 0.58
'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
'            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
'  -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)

Download Solution
Download solution


Tool Screenshots:



Refrences:
PUTTY: http://www.chiark.greenend.org.uk/%7Esgtatham/putty/
PLINK: http://the.earth.li/%7Esgtatham/putty/latest/x86/plink.exe
PLINK Help: http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html

1 comment:

Din M said...

Its really amazing, Thanks for the tool which is very helpful and didn't find the solution till now before this.