Crypto key generate rsa exportable modulus 1024% The key modulus size is 1024 bits% Generating 1024 bit RSA keys, keys will be exportable.OK despues quiero enrolar. Crypto ca enroll CERTIFICADO. Pero al enrollar mi terminal genera una llave de 512 bits. Porque puede ser eso? Mi equipo es un cisco 1811 flash:c181x-advipservicesk9-mz.
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.
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
Next, make sure the switch has a hostname and domain-name set properly.
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.
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.
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.
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.
Next post: How to Backup Oracle Database using RMAN (with Examples)
Previous post: How to Use C++ Single and Multiple Inheritance with an Example
Telnet versus SSH
Many people continue to use Telnet for sensitive applications or access to critical systems. Telnet is CLEARTEXT, so all the data, including the login id is visible is someone intercepts that session
Here’s what this looks like using Wireshark an Open Source Protocol Analyzer when we use the Follow TCP Stream feature in Wireshark.
The next characters are
red
(the character I typed) and
blue
(the characters echoed back)
You clearly see the User Verification Prompt.Here's the telnet trace file.
Below you can see me typing in my username;
In this screenshot below you can see me entering the commandenable and the the enable password.
How to Enable SSH Version 1 on Cisco
Before you can enable SSH you need to assign individual (or group) user IDs and passwords.
These are just login id's and are required regardless if you use Telnet or SSH.
To enable locally administered user IDs, use the following set of configuration commands. I would not suggest using the nopassword parameter.
Put your own data in the italized text.
Now when you telnet into the device you should see the Username prompt
User Access Verification Username: fortunato Password: foghorn> |
Now that you have login id's created you can turn on SSH version 1.
To enable SSH, use the following set of configuration commands. I would not suggest using the nopassword parameter.
Put your own data in the italized text.
foghorn#configure terminalEnter configuration commands, one per line. End with CNTL/Z.foghorn(config)#crypto key generate rsa % Please define a domain-name first.! common mistake when you do not the IP domain-name createdfoghorn(config)#ip domain-name thetechfirm.comfoghorn(config)#crypto key generate rsaThe name for the keys will be: foghorn.thetechfirm.comChoose 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.How many bits in the modulus [512]: 1024% Generating 1024 bit RSA keys ...[OK]foghorn(config)#ip ssh time-out 120foghorn(config)#ip ssh authentication-retries 5foghorn(config)#end |
Now we'll try to capture the SSH login and as you can see the login data is no longer in clear text. Here's the SSH 1 trace file.
The moral of the story is not to use Cleartext logins if the device or application is sensitive.
To upgrade to even more secure SSH version 2, type in the following commands
foghorn(config)#ip ssh version 2 foghorn(config)#no ip ssh version 1 foghorn(config)#end |
the SSH version 2 trace files are here
In this write up I used;
Wireshark Protocol Analyzer(free)
Putty Telnet/SSH Client(free)
Cisco Switch(not free)