shell - Javascript to load putty to a specific ssh host -



shell - Javascript to load putty to a specific ssh host -

i trying create website has links , depending on links load putty ssh connection specific host. ( used internally , ie 6)

so far have ignore host

<script language="javascript"> function connection(host) { oshell = new activexobject("wscript.shell"); oshell.run("putty.exe -ssh" + host + "22"); } </script> <a href="javascript:connection('@1.1.1.1')"> connection 1 </a>

i managed perform need

<script language="javascript"> function connection(host) { var oshell = new activexobject("wscript.shell"); oshell.run('"c:\\archivos de programa\\putty\\putty.exe" -ssh '+ host +' 22'); } </script> <a href="javascript:connection('@1.1.1.1')"> connection 1 </a>

i needed pass location of putty executable (with escaped chars) adding spaces missing in code (afer -ssh , before 22). long putty can run standalone perhaps can place putty.exe in network shared location everyone able launch , important: there consistent location users.

take command-line options of putty can interesting you.

javascript shell putty wscript

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -