Introduction
This document describes how to request access to their Cloud Email Security (CES) CLI.
Background Information
Cisco CES customers are entitled to access the CLI of their ESA and SMA provided through an SSH Proxy using key authentication. CLI access to your hosted appliances must be limited to key individuals within your organization.
Linux and Mac Users
For Cisco CES customers:
Instructions for a shell script utilizing SSH in order to make CLI access via CES proxy.
Prerequisites
As a CES customer, you must have engaged CES On-Boarding/Ops, or Cisco TAC in order to have SSH Keys exchanged and placed:
- Generate Private/Public RSA key(s).
- Provide Cisco with yourPublicRSA key.
- Wait for Cisco to save and notify you that your key(s) have been saved to your CES customer account.
- Copy and modify the connect2ces.sh script.
How do I create Private/Public RSA keys(s)?
Cisco recommends using 'ssh-keygen' on the terminal/CLI for Unix/Linux/OS X. Use the ssh-keygen -b 2048 -t rsa -f ~/.ssh/<NAME> command.
Note: For more information, visit https://www.ssh.com/academy/ssh/keygen.
Ensure that you safeguard access to your RSA private keys at all times.
Do not send your private key to Cisco, only the public key (.pub).
When submitting your public key to Cisco, identify the email address/first name/last name that the key is for.
How do I open a Cisco Support Request to provide my public key?
Configuration
In order to get started, opencopy the script providedand use one of these proxy hosts for the Host Name.
Ensure you choose the correct proxy for your region (that is, If you are a US CES customer, in order to reach F4 data center and appliances, use the f4-ssh.iphmx.com. If you are an EU CES customer with an appliance in German DC, use f17-ssh.eu.iphmx.com.).
AP (ap.iphmx.com)
f15-ssh.ap.iphmx.com
f16-ssh.ap.iphmx.com
CA (ca.iphmx.com)
f13-ssh.ca.iphmx.com
f14-ssh.ca.iphmx.com
EU (c3s2.iphmx.com)
f10-ssh.c3s2.iphmx.com
f11-ssh.c3s2.iphmx.com
EU (eu.iphmx.com)(German DC)
f17-ssh.eu.iphmx.com
f18-ssh.eu.iphmx.com
US (iphmx.com)
f4-ssh.iphmx.com
f5-ssh.iphmx.com
What if I want to connect to more than one Email Security Appliance (ESA) or Security Management Appliance (SMA)?
Copy and save a second copy of the connect2ces.sh, such as connect2ces_2.sh.
Note: You will want to edit the 'cloud_host' to be the additional appliance you wish to access.
You will want to edit the 'local_port' to be something OTHER than 2222. If not, you will receive an error, "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"
How can I configure my ESA or SMA to log in without prompting for a password?
What can this look like once I have the prerequisites completed?
joe.user@my_local > ~ ./connect2ces
[-] Connecting to your proxy server (f4-ssh.iphmx.com)...
[-] Proxy connection successful. Now connected to f4-ssh.iphmx.com.
[-] proxy running on PID: 31253
[-] Connecting to your CES appliance (esa1.rs1234-01.iphmx.com)...
Last login: Mon Apr 22 11:33:45 2019 from 10.123.123.123
AsyncOS 12.1.0 for Cisco C100V build 071
Welcome to the Cisco C100V Email Security Virtual Appliance
NOTE: This session will expire if left idle for 1440 minutes. Any uncommitted configuration changes will be lost. Commit the configuration changes as soon as they are made.
(Machine esa1.rs1234-01.iphmx.com)>
(Machine esa1.rs1234-01.iphmx.com)> exit
Connection to 127.0.0.1 closed.
[-] Closing proxy connection...
[-] Done.
connect2ces.sh
Note: Ensure you choose the correct proxy for your region (that is, If you are a US CES customer, in order to reach F4 data center and appliances, use the f4-ssh.iphmx.com. If you are an EU CES customer with an appliance in German DC, use f17-ssh.eu.iphmx.com.).
Windows Users
Instructions for using PuTTY and utilizing SSH in order to make CLI access via CES proxy.
Prerequisites
As a CES customer, you must have engaged CES On-Boarding/Ops, or Cisco TAC to have SSH Keys exchanged and placed:
- Generate Private/Public RSA key(s).
- Provide Cisco with your Public RSA key.
- Wait for Cisco in order to save and notify you that your key(s) have been saved to your CES customer account.
- Setup PuTTY as detailed here in these instructions.
How do I create Private/Public RSA keys(s)?
Cisco recommends using PuTTYgen (https://www.puttygen.com/) for Windows.
For more information:https://www.ssh.com/ssh/putty/windows/puttygen.
Note: Ensure that you safeguard access to your RSA private keys at all times.
Do not send your private key to Cisco, only the public key (.pub).
When submitting your public key to Cisco, identify the email address/first name/last name that they key is for.
How do I open a Cisco Support Request to provide my public key?
How can I configure my ESA or SMA to log in without prompting for a password?
PuTTy Configuration
In order to get started, open PuTTY and use one of these proxy hosts for the Host Names:
Ensure you choose the correct proxy for your region (that is, If you are a US CES customer, in order to reach F4 data center and appliances, use the f4-ssh.iphmx.com. If you are an EU CES customer with an appliance in German DC, use f17-ssh.eu.iphmx.com.).
AP (ap.iphmx.com)
f15-ssh.ap.iphmx.com
f16-ssh.ap.iphmx.com
CA (ca.iphmx.com)
f13-ssh.ca.iphmx.com
f14-ssh.ca.iphmx.com
EU (c3s2.iphmx.com)
f10-ssh.c3s2.iphmx.com
f11-ssh.c3s2.iphmx.com
EU (eu.iphmx.com)(German DC)
f17-ssh.eu.iphmx.com
f18-ssh.eu.iphmx.com
US (iphmx.com)
f4-ssh.iphmx.com
f5-ssh.iphmx.com

ClickDataand for login details, use auto-login username and enter dh-user.

Choose SSH and check Don't start a shell or command at all.

Click Authand for Private key file for authentication, browse and choose your private key.

Click Tunnels.
Enter in a Source port; this is any arbitrary port of your choice (example uses 2200).
Enter in aDestination; this is your ESA or SMA + 22 (specifying SSH connection).

After you click Add it must look like this.

In order to save the session for future use, click Session.
Enter a name for your 'Saved Session', and click Save.

At this time you can click Open and initiate the proxy session.
There will not be any login or command prompt. You will now need to open a second PuTTY session to your ESA or SMA.
Use the hostname 127.0.0.1 and use the source port number in the tunnel configuration shown earlier.
For this example, 2200 is used.
ClickOpenin order to connect to your appliance.

When prompted use your appliance username and password, the same as you will with UI access.
Troubleshooting
If your SSH key pair was generated using OpenSSH (non-PuTTy), you are unable to connect and will be presented with an "old PEM format" error.

The private key can be converted usingPuTTY Key Generator.
- Open PuTTy Key Generator.
- ClickLoadin order to browse and load your existing private key.
- You will need to click the drop-down and chooseAll Files (.)so you can locate the private key.
- ClickOpenonce you have located your private key.
- Puttygen will provide a notice like in this image.

- ClickSave private key.
- From your PuTTY session, use this converted private key and save the session.
- Attempt re-connecting with the converted private key.
Confirm that you are able to access your appliances via the command line.