NSH with Putty or Mintty - How To

Version 1



    Following on from Gerardo Bartoccini post on NSH with Putty I've created a short how to.  The NSH window uses the MS-DOS command line interface and using the interface is very ugly.  Simple things like cut and paste and window re-sizing is difficult, whereas putty and mintty are far more user friendly. 


    What You'll Need


    In order to run through this tutorial you'll need to have a BSA environment and a copy of either putty or mintty downloaded.  Either of the terminals are exchangeable in this tutorial but I've written it with putty in mind.


    Download Links



    NSH Desktop Shortcut With Putty


    Download and extract full contents of putty to a directory of choice.  I've chosen "C:\Program Files\BMC Software\BladeLogic\8.1\NSH\bin"




    Next right click on desktop and select "New Shortcut".


    new shortcut.png

    Insert the location of the executable with the following arguments to launch nsh within your terminal.


    "C:\Program Files\BMC Software\BladeLogic\8.1\NSH\bin\putty.exe" -cygterm .\nsh.exe




    This will create a shortcut where you can launch nsh with putty from the desktop.



    The same approach can be used for mintty all you do is change the name of the executable to "mintty.exe".


    "C:\Program Files\BMC Software\BladeLogic\8.1\NSH\bin\mintty.exe" -cygterm .\nsh.exe




    "Putty NSH Here" Custom Command With Putty


    Open up the custom command window and click on the green plus.

    custom command.png


    Next we select that we want a Local GUI



    In the editor we insert the following command with appropriate flags to launch nsh with putty.


    -D = --pushdtohome

    %H = host argument

    %p = path



    "C:\Program Files\BMC Software\BladeLogic\8.1\NSH\bin\putty.exe" -cygterm nsh.exe -D //%H"%p"



    I've selected servers & folders and that the command will execute without the option to select multiple hosts.



    Next we run our custom command by right clicking a server we want to open an NSH console to.


    We use our custom command Putty NSH Here.

    putty nsh here.png


    You can see we now have a putty nsh window available to us on the target server.




    Here is an example of what mintty looks like as a custom command, we follow the same procedure to create mintty nsh here.




    Next window shows us selecting a particular directory and running putty nsh here with pwd to output the directory path.








    As mentioned putty nsh is an easier terminal to use than the ms dos version.


    I hope you found this useful, please leave comments or questions.