howtonetwork.net

Cisco Certification Training

  • Products
  • CCNA
    • CCNA Videos
    • CCNA Lectures
    • CCNA Practice Exams
    • Challenge Labs
      • Challenge Video Solutions
    • Cisco Commands
  • CCNP ROUTE
    • ROUTE Exams
  • CCNP SWITCH
    • SWITCH Exams
  • CCNP TSHOOT
  • Home
  • Join
  • Downloads
  • About Us
  • Whitepapers
  • Feature Articles
  • Helpdesk
  • FAQ
  • Free Training
You are here: Home / ssh

ssh

Command

SSH

Use

Allows you to securely connect to a remote device. Unlike telnet, all packets are encrypted. As a result, SSH is a much more secure method of connecting to a device.

Syntax

Router#ssh -l <user> <ip address or DNS name>

Optional Switches

-c Select encryption algorithm
-l Log in using this user name *Requried
-m Select HMAC algorithm

-o Specify options
-p Connect to this port
-v Specify SSH Protocol Version

Note: There are more options for SSH but they are considered above and beyond the CCNA level.

Example

simple

This example demonstrates how to use SSH on one of the routers. Before enabling SSH, however, there a few requirements that must be completed:

  • You must set a domain-name on the Router with the ip domain-name <name> command
  • You have to generate an encryption key. This is done with the crypto key generate rsa command
  • Under line vty <line number>, you will need to enable SSH with transport input ssh
  • Under line vty <line number>, you will also need to enable username authentication with local local
  • Finally, you need to create a user account on the router with username <word> password <word>

R1(config)#crypto key generate rsa
% Please define a domain-name first.
^
% Invalid input detected at ‘^’ marker.

R1(config)#ip domain-name howtonetwork.net
R1(config)#crypto key generate rsa
The name for the keys will be: R1.howtonetwork.net
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.

How many bits in the modulus [512]:
% Generating 512 bit RSA keys, keys will be non-exportable…[OK]

R1(config)#
*Mar 1 00:55:02.791: %SSH-5-ENABLED: SSH 1.99 has been enabled
R1(config)#

R1(config)#line vty 0 4
R1(config-line)#transport input ssh
R1(config-line)#login local
R1(config-line)#exit
R1(config)#username R1 password cisco

After configuration is complete, we use SSH to connect to R1 via R2.

R2#ssh -l R1 10.1.1.1

Password: *****

R1>

 
Get access to over 5 hours of IT webinar videos as well as regular study tips and ideas when you
join our mailing list

About This Site

We replaced this site some time ago with an upgraded version. Please feel free to enjoy the content and if you like what you see check out our brilliant new site:

howtonetwork.com

Keep In Touch

About Us

This is a free access website which has now been replaced by howtonetwork.com.

Navigation

  • Home
  • Join
  • Downloads
  • About Us
  • Whitepapers
  • Feature Articles
  • Helpdesk
  • FAQ
  • Free Training

Copyright

All content is protected by international copyright laws. Copyright Reality Press Ltd.

Copyright © 2023 · Dynamik Website Builder on Genesis Framework · WordPress · Log in