Working with the CLI

Lee Painter

The Virtual SFTP management CLI is available by logging into the server using an SSH client on port 2222. If you have not already logged into the server, you should consult the article Logging in for the First Time where we provide the default credentials and show how to harden the SSH server once you have logged in.

==============================================
_ _ _ _
(_) __ _ __| | __ _ _ __ | |_(_)_ _____
| |/ _` |/ _` |/ _` | '_ \| __| \ \ / / _ \
| | (_| | (_| | (_| | |_) | |_| |\ V / __/
_/ |\__,_|\__,_|\__,_| .__/ \__|_| \_/ \___|
|__/ |_|

Virtual SFTP Server
0.0.2-SNAPSHOT
==============================================

Type 'help' for a list of commands.

#

 

You can type help to list all the supported commands or help <command> for specific help on each individual command.

# help updates
updates [option]
-c, --check Check for updates
-i, --install Install available updates

 

Those that have used Linux shells you will find a number of familiar built-in commands.

Clearing the Screen

# clear

Exiting the shell

# exit

Echoing  Text

# echo hello!
hello!

Create an Alias

You can create an alias for a custom command line.

# alias foo="echo foo"

You can then use the alias to execute the command.

# foo
foo

Remove an Alias

Use unalias to remove

# unalias foo

Print out the Current Date

# date
17/03/20 19:52

Sleep for a Period of Time

You can sleep for a period of time. For example to sleep for 30 seconds use:

# sleep 30

To change the default period represented by the argument, use the command-line options -M for milliseconds, -h to change to hours, -m for minutes and -d for days.