13.04.2020»»понедельник

Cisco Crypto Key Generate Rsa 2048

13.04.2020

Using Microsoft Windows Certificate Authority (CA) Certificates on Cisco IOS

The Cisco ASA firewall appliance provides both graphical and command line methods for connecting to the device for management. With the graphical method. Connecting to the ASA Firewall with Telnet and SSH. ASA-FIREWALL(config)# crypto key generate rsa modulus 2048. MORE READING: Cisco ASA VPN Hairpinning. After issuing this command.

I couldn’t find a guide that combined all of the necessary steps together. This guide assumes you already have SSH/telnet/terminal access to your router and already have a functioning Windows Certificate Authority, I used 2K8R2 but I’m sure you could use 2K3, 2K3R2 or 2K8. Heads up, on older versions of IOS, “pki” needs to be interchanged to “ca”.

1. Create a 2048 bit RSA key.

2. Create a trustpoint. A trustpoint represents a trusted CA.

Pair

  • Apr 03, 2015  First, create a key: crypto key generate rsa label mykey modulus 2048 Next, create a trustpoint which references the key, and generate a self-signed certificate: crypto ca trustpoint throwaway keypair mykey enrollment self crypto ca enroll throwaway noconfirm Now the throwaway trustpoint has a certificate. Export that certificate to the terminal.
  • Show crypto key mypubkey rsa: Shows information about the SSL certificate If you’d like to learn more about on how to configure SSH on a Cisco router I recommend you read through this documentation: Configuring Secure Shell on Routers and Switches Running Cisco IOS.
  • Telnet versus SSH. Many people continue to use Telnet for sensitive applications or access to critical systems. (config)#crypto key generate rsa% Please define a domain-name first.! Common mistake when you do not the IP domain-name. Choose the size of the key modulus in the range of 360 to 2048 for your. General Purpose Keys.
  • Get Cisco IOS Cookbook. End with CNTL/Z. Router1(config)#crypto key generate rsa The name for the keys will be: Router1.oreilly.com Choose the size of the key modulus in the range of 360 to 2048 for your General Purpose Keys. Choosing a key modulus greater than 512 may take a few minutes.

3. We need to create a CSR (Certificate Request) to give to the MS Certificate Server

4. Go to your Microsoft CA’s web Certificate Services. You have to use the web services as opposed to using the MMC snap-ip. If you use the snap-in you’ll get a 0×80094801: Denied by Policy Module error because the certificate request does not contain a Certificate Template request attribute, aka it doesn’t know what kind of cert you want unless you go through the Web GUI.

Open your browser and go to https://yourserver/certsrv/certcarc.asp

Download your CA Certificate as a Base 64 certificate, and rename it to something to identify it as the root certificate.

5. Convert your CSR into an actual certificate

Head over to https://yourserver/certsrv/certrqxt.asp and paste your certificate request into the box, select “web server” from the certificate template list and press submit. When you get a result download the certificate as a base64 certificate.

6. Install the root certificate

7. Almost there, now time to install your router’s new certificate.

Cisco Rsa Key

8. Test your Certificate

show crypto pki certificates

9. If nothing went wrong you should now have the certificate installed. You can change your hostname to match the new certificate, or change services to it. For example Cisco AnyConnect SSL VPN.

Thanks to http://bytesolutions.com/Support/Knowledgebase/KB_Viewer/ArticleId/21/Installing-GoDaddy-SSL-Certificates-on-a-Cisco-IOS-Router-using-CLI.aspx and https://robbiecrash.me/?p=242 for helping me find the information that I combined to make this happen. Thanks guys for posting your exploits!

Q: I have a Cisco switch in my network, which I can access by hooking up a console cable directly to the device. I like to access the switch remotely using SSH. How can I enable ssh on my Cisco 3750 Catalyst Switch?
A: By default, when you configure a Cisco device, you have to use the console cable and connect directly to the system to access it. Follow the steps mentioned below, which will enable SSH access to your Cisco devices. Once you enable SSH, you can access it remotely using PuTTY or any other SSH client.

1. Setup Management IP

First, make sure you have performed basic network configurations on your switch. For example, assign default gateway, assign management ip-address, etc. If this is already done, skip to the next step.

In the following example, the management ip address is set as 192.168.101.2 in the 101 VLAN. The default gateway points to the firewall, which is 192.168.101.1

2. Set hostname and domain-name

Next, make sure the switch has a hostname and domain-name set properly.

3. Generate the RSA Keys

The switch or router should have RSA keys that it will use during the SSH process. So, generate these using crypto command as shown below.

Also, if you are running on an older Cisco IOS image, it is highly recommended that you upgrade to latest Cisco IOS.

4. Setup the Line VTY configurations

Setup the following line vty configuration parameters, where input transport is set to SSH. Set the login to local, and password to 7.

If you have not set the console line yet, set it to the following values.

5. Create the username password

If you don’t have an username created already, do it as shown below.

Note: If you don’t have the enable password setup properly, do it now.

Make sure the password-encryption service is turned-on, which will encrypt the password, and when you do “sh run”, you’ll seee only the encrypted password and not clear-text password.

Crypto Key Generate Rsa Ssh

5. Verify SSH access

From the switch, if you do ‘sh ip ssh’, it will confirm that the SSH is enabled on this cisco device.

After the above configurations, login from a remote machine to verify that you can ssh to this cisco switch.

In this example, 192.168.101.2 is the management ip-address of the switch.

> Add your comment

If you enjoyed this article, you might also like.



Next post: How to Backup Oracle Database using RMAN (with Examples)

Want to improve this question? Generate rsa public key from modulus exponent online.

Cisco Crypto Key Generate Rsa

Previous post: How to Use C++ Single and Multiple Inheritance with an Example