{"id":38941,"date":"2025-06-01T05:57:44","date_gmt":"2025-06-01T11:57:44","guid":{"rendered":"https:\/\/sanuja.com\/blog\/?p=38941"},"modified":"2025-06-01T06:00:49","modified_gmt":"2025-06-01T12:00:49","slug":"ccna-lab-2-configure-ssh-on-router-and-switch","status":"publish","type":"post","link":"https:\/\/sanuja.com\/blog\/ccna-lab-2-configure-ssh-on-router-and-switch","title":{"rendered":"CCNA Lab 2: Configure SSH on Router and Switch"},"content":{"rendered":"<p>In this YouTube CCNA tutorial, I use a real CCNA lab assignment from CCNA 1: Introduction to Networks curriculum. It is based on a Cisco Packet Tracer lab. You must create the lab Packet Tracer file for yourself based on a set of instructions provided to you by the CCNA administrators. The instructions are listed below the video. The commands used is <a href=\"#cs\">listed below<\/a> for your reference.<!--more--><\/p>\n<h2>Video Tutorial<\/h2>\n<p><iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/1h9ep0A-CrM?si=OW_FL4889-MsdylL\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h2 id=\"cs\">Lab Instructions<\/h2>\n<p>Configure SSH on Router and Switch<br \/>\nPart 1:<br \/>\nDownload the Packet Tracer simulation program from the Cisco website. Install Packet Tracer and follow the instructions provided here to complete this lab.<br \/>\nPart 2:<br \/>\nYou will not be provided with a pre-configured Packet Tracer file. Follow the instructions to:<br \/>\n1.\tCreate a network topology with a generic PC (PC-PT), a 2950-24 switch and a 2911 router.<br \/>\n2.\tConnect the devices in this order: PC \u2013 Switch \u2013 Router, using appropriate cables. The router G0\/0 interface should be connected to Switch Fe0\/1 interface. The PC must be connected to Fe0\/2 interface of the switch.<\/p>\n<p>Part 3:<br \/>\nConfigure the SSH on both the router and the switch using appropriate commands. You must also adhere to the following instructions:<br \/>\n1.\tThe router hostname: R1<br \/>\n2.\tThe switch hostname: SW1<br \/>\n3.\tBoth the router and the switch must have a MOTD (Message Of The Day) that is meaningful<br \/>\n4.\tUse your first name as the domain name<br \/>\n5.\tAll passwords must be cisco<br \/>\n6.\tAll passwords must be encrypted<br \/>\n7.\tRSA keys must be set to 1024-bit<br \/>\n8.\tSSH connection must use version 2<br \/>\n9.\tNetwork address map:<br \/>\nDevice\tInterface\tIP Address\tMask<br \/>\nPC\tNIC\t192.168.1.10\t255.255.255.0<br \/>\nR1\tG0\/0\t192.168.1.1\t255.255.255.0<br \/>\nSW1\tVLAN 1\t192.168.1.2\t255.255.255.0<\/p>\n<p>Part 4:<\/p>\n<p>You must be able to ping the R1 and SW1 from the PC. You must be able to connect to the R1 and SW1 using SSH.<\/p>\n<p>Once the connections are confirmed, please save your Packet Tracer file and submit it to your instructor by uploading it to Cisco NetAcad lab assignment area.<\/p>\n<p>Read the YT video description for supporting materials and link to documentation page for this lab.<\/p>\n<h2 id=\"cs\">Commands Used<\/h2>\n<p><code><br \/>\nPC 1 - Terminal<br \/>\n=====<br \/>\nInitial config diag: No<br \/>\nen <-privilege exec mode<br \/>\nconfig t <-global configuration mode\n\n\n\n====hostname=====<br \/>\nhostname R1<\/p>\n<p>====banner=====<br \/>\nbanner motd #NetITGeeks R1#<\/p>\n<p>====Interface config=====<br \/>\nint g0\/0<br \/>\nip addr 192.168.1.1 255.255.255.0<br \/>\nno shut<br \/>\nexit<\/p>\n<p>=========<br \/>\nip domain-name sanuja<br \/>\nusername sanuja secret cisco<br \/>\nenable secret cisco<\/p>\n<p>=========<br \/>\nline console 0<br \/>\npassword cisco<br \/>\nlogin<br \/>\nexit<\/p>\n<p>====to encrypt line console pass===<br \/>\nservice password-encryption  <\/p>\n<p>==Generate RSA keys for SSH connection==<br \/>\ncrypto key generate rsa<br \/>\n1024<br \/>\nip ssh version 2<\/p>\n<p>==Allow connections to router via virtual lines===<br \/>\nline vty 0 15<br \/>\ntransport input ssh<br \/>\nlogin local<\/p>\n<p>4. Setup the PC IP address<br \/>\nIP: 192.168.1.10<br \/>\nSubnet Mask: 255.255.255.0 <br \/>\nDefault Gateway: 192.168.1.1<\/p>\n<p>5. Try pinging the router 192.168.1.1 using CMD - OK<br \/>\n6. ssh -1 sanuja 192.168.1.1<br \/>\n-----Password<br \/>\nen<br \/>\nconfig t<\/p>\n<p>===========================================================<br \/>\nSwitch<\/p>\n<p>7. Connect the console cable between the PC0 and SW1<br \/>\n8. Configure the switch<br \/>\nen<br \/>\nconfig t<br \/>\nho SW1<br \/>\nbanner modt #NetITGeeks R2#<br \/>\nint vlan 1<br \/>\nip add 192.168.1.2 255.255.255.0<br \/>\nno shut<\/p>\n<p>enable secret cisco<br \/>\nline con 0<br \/>\npassword cisco<br \/>\nexit<br \/>\nusername sanuja secret cisco<br \/>\nservice password-encryption<br \/>\nip domain-name Sanuja<br \/>\ncrypto key generate rsa<br \/>\n1024<br \/>\nip ssh version 2<br \/>\nline vty 0 15<br \/>\ntransport input ssh<br \/>\nlogin local<br \/>\nexit<\/p>\n<p>ip default-gateway 192.168.1.1<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this YouTube CCNA tutorial, I use a real CCNA lab assignment from CCNA 1: Introduction to Networks curriculum. It is based on a Cisco Packet Tracer lab. You must create the lab Packet Tracer file for yourself based on a set of instructions provided to you by the CCNA administrators. The instructions are listed &hellip; <a href=\"https:\/\/sanuja.com\/blog\/ccna-lab-2-configure-ssh-on-router-and-switch\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">CCNA Lab 2: Configure SSH on Router and Switch<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":38946,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[51],"tags":[52,19],"class_list":["post-38941","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ns","tag-ccna1","tag-tutorials"],"jetpack_featured_media_url":"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2025\/05\/thumbnail_CCNA-Lab-2-Configure-SSH-on-Router-and-Switch-Real-CCNA-1-lab-demo.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/posts\/38941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/comments?post=38941"}],"version-history":[{"count":7,"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/posts\/38941\/revisions"}],"predecessor-version":[{"id":38950,"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/posts\/38941\/revisions\/38950"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/media\/38946"}],"wp:attachment":[{"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/media?parent=38941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/categories?post=38941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/tags?post=38941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}