Enable and Configure Secure Shell SSH v2 On Cisco Devices

Enable and Configure Secure Shell SSH v2 On Cisco Devices

CE1#show ip ssh 
SSH Disabled – version 1.99
%Please create RSA keys to enable SSH (and of atleast 768 bits for SSH v2).
Authentication methods:publickey,keyboard-interactive,password
Authentication Publickey Algorithms:x509v3-ssh-rsa,ssh-rsa
Hostkey Algorithms:x509v3-ssh-rsa,ssh-rsa
Encryption Algorithms:aes128-ctr,aes192-ctr,aes256-ctr
MAC Algorithms:hmac-sha1,hmac-sha1-96
Authentication timeout: 120 secs; Authentication retries: 3
Minimum expected Diffie Hellman key size : 1024 bits
IOS Keys in SECSH format(ssh-rsa, base64 encoded): NONE
CE1#config t
Enter configuration commands, one per line.  End with CNTL/Z.
CE1(config)#ip domain-name bb.com
CE1(config)#username bbandi password bbandi
CE1(config)#crypto key generate rsa 
The name for the keys will be: CE1.bb.com
Choose the size of the key modulus in the range of 360 to 4096 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, keys will be non-exportable…
[OK] (elapsed time was 1 seconds)
CE1(config)#
%SSH-5-ENABLED: SSH 1.99 has been enabled
CE1(config)#ip ssh version 2
CE1(config)#line vty 0 4
CE1(config-line)#transport input none 
CE1(config-line)#transport input ssh 
CE1(config-line)#end
%SYS-5-CONFIG_I: Configured from console by console
CE1#show ip ssh 
SSH Enabled – version 2.0
Authentication methods:publickey,keyboard-interactive,password
Authentication Publickey Algorithms:x509v3-ssh-rsa,ssh-rsa
Hostkey Algorithms:x509v3-ssh-rsa,ssh-rsa
Encryption Algorithms:aes128-ctr,aes192-ctr,aes256-ctr
MAC Algorithms:hmac-sha1,hmac-sha1-96
Authentication timeout: 120 secs; Authentication retries: 3
Minimum expected Diffie Hellman key size : 1024 bits
IOS Keys in SECSH format(ssh-rsa, base64 encoded): CE1.bb.com
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC2sle25cmVMxdOs247A7x41eIGBPkZ61ZHr+zCORvh
Bdrx4uFdIL9kk+Iu2swZENJHX4E7EfUKnWSW7rYe4btPKORezOhorAojgdPACcliTlSoaG/pCGhBZCrC
knlGoRqspnL63oDi8pqGqRNt+MnSfUgaYRm6ecgt+r3H0zmlQw==