CMShell for NetStorage

Document created by Eric Yan Employee on Sep 21, 2015Last modified by Eric Yan Employee on Nov 10, 2016
Version 2Show Document
  • View in full screen mode

What is CMShell?

CMShell = Content Management Shell, it provides limited shell-capabilities for end user to manage contents in NetStorage.


From help commands below, the following command is available once login:

CMShell's built-in commands

[EricMac /]$ help

az2z        rewrite zip file to Akamai zip file format

cat        concatenate files and print on the standard output

cd        change directory

cp        copy files and directories

debug        view/toggle debug mode

du        estimate file space usage

help        list all commands

hostname        show the system's IP address

ln        make links between files

ls        list directory contents

md5sum        compute and check MD5 message digest

mkdir        make directories

mv        move (rename) files

pwd        print name of current/working directory

rm        remove files or directories

rmdir        remove empty directories

sst        a utility to retrieve files from the World Wide Web

stat        print inode contents

unzip        list, test and extract compressed files in a ZIP archive

wget        a utility to retrieve files from the World Wide Web

exit        exit


How to use CMShell?

#1. Firstly you need to enable SSH login

using the following command to generate your SSH key-pairs

ssh-keygen -v -t rsa -b 2048 -C "<replaced with yourname to identify yourself>" -f Netstorage_SSH


     -C "Any text" refers to the comments that you can add for the key to help identify the usage of the key and

     -Netstorage_SSH refers to the name of the NetStorage key that you wish to give.


an example below:


How to generate SSH key-pairs

$ssh-keygen -v -t rsa -b 2048 -C "" -f Netstorage_SSH

Generating public/private rsa key pair.

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in Netstorage_SSH.

Your public key has been saved in

The key fingerprint is:


The key's randomart image is:

+--[ RSA 2048]----+

| . ..            |

| .=  .           |

|.oo..            |

|.o +=.E          |

|* *ooo. S        |

|oB =   .         |

|o o .            |

|   .             |

|                 |


$ls -l Netstorage_SSH*

-rw-------  1 myan  600  1766 Sep 21 16:24 Netstorage_SSH

-rw-r--r--  1 myan  600   397 Sep 21 16:24

Now add and upload accoutn and paste your pubkey "", save it. Two hours later, you should be able to use SSH to connect to NetStorage.

#2. The syntax to log into NetStorage to use CMShell

ssh -t sshacs@<your_ns_account> -i <your_private_key> cms

#3. Once you are in CMShell, the content in the NetStorage is at your command.

To remove all the content in a folder: #rm -f /path_to_your_folder/*

To remove all the apk files in a certain folder: # rm -f /path_to_your_folder/*.apk

3 people found this helpful