Considerations for FTP server credentials with special characters

Written by BiRU Monday, 26 September 2016 09:26

Print

FTP server credentials may include special characters that need to be handled in specified manner on the Command Line Interface (CLI).

Special characters also referred to as meta-characters, are members of an exempt set of characters, which when used in command line mode are evaluated as characters with non-literal meaning. These characters are designated to carry out a special instruction, or have an alternate meaning.

NOTE
This list is not exhaustive and alternate meaning for some characters is contextual. For more information, refer to any Linux scripting information available for general use on the internet.

A list of some of the more commonly used special characters and their alternate meaning is as follows:

These special characters may be used to enhance the security of the user credentials. However, to interpret these characters properly in the CLI mode, you must follow one of the following methods:

If single quotes are themselves part of the credential, precede each instance of the single quote with the escape character (\). Alternately, the string may be enclosed in double quotes if more intricate bash substitution is desired to further strengthen the security measure of the credentials.

For detailed information on using the special characters in the credentials, refer to any Linux scripting information available for general use on the internet.

You can test the representation of the credentials using the echo tests.

Examples to verify the use of special characters

To verify the use of single quote for the password aaa!01:
switch:admin> echo ‘aaa!01’
aaa!01
To verify escaping ! without quotes for the password aaa!01:
switch:admin> echo aaa\!01
aaa!01
To verify using the quotes, excluding the \! for password aaa!01:
switch:admin> echo "aaa"\!"01"
aaa!01
To verify using the quotes without excluding the \! for password aaa!01, resulting in different password pattern:
switch:admin> "aaa\!01"
aaa\!01 
To verify using the quotes around the \! for password aaa!01, resulting in different password pattern:
switch:admin> echo ‘aaa!01’
aaa!01