How to Configure SSH Access to a Cisco ASA Firewall
- Using the graphical user interface ASDM
- Using the CLI (Command Line Interface) which requires SSH access to the ASA and this document will show how to set that up as it is not enabled by default.
You will need is to create a username on the ASA for logging in with –
username <name> password <password> eg.
asa(config)# username asauser password ciscoletmein – (obviously you would choose a more secure password for a production system)
You need to tell the ASA where to look for the user account details which in this case is on the device itself. Cisco devices also support having a centralised account database and you can tell each device to query the database for user details but that is not covered in this document.
asa(config)# aaa authentication ssh console LOCAL
SSH requires a set of public and private keys to secure the connection so you need to generate them.
asa(config)# crypto key generate rsa general-keys modulus 1024
This is optional but it is recommended to only allow SSH version 2 –
asa(config)# ssh version 2
The final step is to tell the ASA on which interfaces to allow SSH and from which IPs. You would generally want to restrict this to specific management IPs if possible. In addition it is preferable not to allow connections on the outside interface on an internet facing firewall but this is not always possible depending on the topology.
If you are going to allow SSH connections to the outside interface then it very strongly recommended that you only allow specific IPs that access.
You would allow access using the following command –
ssh <IP address> <subnet mask> <interface name>
ssh 172.16.7.0 255.255.255.0 inside
would allow connections from any IP in the 172.16.7.x subnet on the inside interface of the ASA.