in NetScaler, Platforms, System

File Transfers via putty to NetScaler

With the introduction of NetScaler 10.5 most of the java is gone, But some bits and pieces remain Java for a bit longer, including the update window and this blog will show you how to update you NetScaler by only using Putty PSCP.

I guess you have all been there, you would like to update a NetScaler but you cannot use the GUI and have no rights to install a SCP tool like WinSCP or FileZilla. Luckily Putty files are just executables you can always run on any Windows OS (writing this I finally realise how good putty is). So let’s move some files to the NetScaler using Putty and start the update from the CLI.

Requirements

  • A Windows client or server
  • Putty and Putty PSCP (for download here)
  • A NetScaler that is accessable via SSH (port 22 usually)
  • a BACKUP of you NS config

NEW – Creating a manual back-up

Recommended is to create a back-up of you NetScaler config before making any changes, including a upgrade. To do so you can use the back-up option in the GUI, but in this example we will tar the nsconfig directory. This directory holds the config files, but also you certificates, etc. (Note: certificates = store back-up safe!)

To create a back-up:

  1. SSH into you NetScaler
  2. Drop to the shell by typing  shell
  3. type  cd /nsconfig
  4. type  tar cvz -f <backupfilename>.tgz .
  5. You can check if you have all the files in the back-up archive byt typing  tar --list -f <backupfilename>.tgz . 

Downloading the back-up file

To download the back-up file using PSCP do the following:

  1. Drop to a Command Prompt on your Windows machine
  2. Go to the folder holding pscp
  3. Type the following command to upload a firmware to the NetScaler

    For example:
  4. You get a prompt for a password and afterwards the download progress bar is shown.

Uploading the files

To upload the files to your NetScaler using putty do the following

  1. Drop to a Command Prompt on your Windows machine
  2. Go to the folder holding pscp
  3. Type the following command to upload a firmware to the NetScaler

    If you want to file to go into a specific dir on the NetScaler make sure you create that first, in this example we created a 10.5/51/ folder for the files to go in. The default path for firmware files to go in is /var/nsinstall, create additional follders in there.

    Example:

  4. You get a prompt for a password and afterwards the upload progress bar is shown uploading the file:
    Screen Shot 2014-09-20 at 10.02.36

Updating Firmware

Updating the NetScaler firmware from the NetScaler BSD Shell is done following the next procedure:

  1. BACKUP!
  2. Untar the contents of the file on the NetScaler from the command line by ssh-ing into the NetScaler. Drop to the BSD shell by typing shell , go to the newly created directory ( /var/nsinstall/10.5/51/ ) and type   tar -zxf <filename>
  3. Run the “installns” script by typing ./installns . The upgrade will now start and if all goes well should display something like this:

    Reboot the box and you should have a nicely inplace upgraded NetScaler!
  4. When you log back in you can check the firmware in the console:
    1. CLI
    2. GUI
      Hover over the info box in the top right corner to see the running version.

References

What do you think?

Comment

  1. Hi, have you ever encountered a scenario where a device was rendered inoperable after a firmware upgrade? I attempted to upgrade one of our MPX9700 FIPS Netscalers from NS10.5 53.9.nc to NS10.5 59.11.nc this weekend. The firmware upgrade itself seemed to go through fine but after I answered Y to reboot, the device never came back up. It is stuck at Booting on the LCD without any network connectivity. Tried power cycling a few times to no avail. Tried connecting up an RS232 cable from COM port on PC to COM port on Netscaler and connecting using hyperterminal with 9600 baud, 8 bits, 1 stop bit, No parity. Nothing would show up on the screen when power cycling with the COM port connected.

    Is there anything else I could possibly try to recover this device? Admittedly I’m not very experienced with this scenario as the other two devices took the same firmware upgrade without issue.

    • Hi, nasty problem. Did you file a support case? Might be a broken disk, please check but tech support would be your best bet!

Webmentions

  • How To Upload A File Into Putty | Information November 9, 2015

    Hi, nasty problem. Did you file a support case? Might be a broken disk, please check but tech support would be your best bet!