{"id":89,"date":"2015-08-27T16:27:55","date_gmt":"2015-08-27T16:27:55","guid":{"rendered":"http:\/\/wiki.thomasandsofia.com\/?p=89"},"modified":"2015-09-06T20:16:47","modified_gmt":"2015-09-06T20:16:47","slug":"ccent-3-s01-e13-lans-configuring-switch-security-1","status":"publish","type":"post","link":"https:\/\/wiki.thomasandsofia.com\/?p=89","title":{"rendered":"CCENT 3 S01 E13 \u2013 LANS: Configuring Switch Security 1"},"content":{"rendered":"<h3>Configuring Passwords on a Cisco Switch<\/h3>\n<p>The first time you attempt to Telnet, you will be denied because no passwords have been set. Passwords must be set via the terminal:<\/p>\n<pre>Sw1&gt;<span style=\"color: #00ffff;\">enable<\/span>\r\nSw1#<span style=\"color: #00ffff;\">conf t<\/span>\r\nSw1(config)#<span style=\"color: #00ffff;\">enable password PassWord\r\n<\/span><\/pre>\n<p>Test the new password by exiting back to User Mode, then attempt to enter Privilege mode.<\/p>\n<pre>Sw1(config)#<span style=\"color: #00ffff;\">exit<\/span>\r\nSw1#<span style=\"color: #00ffff;\">disable<\/span>\r\nSw1&gt;<span style=\"color: #00ffff;\">enable<\/span>\r\nPassword:_<\/pre>\n<div class=\"notice\">Spaces are allowed in passwords Example: &#8220;Hello World&#8221;<\/div>\n<p>&nbsp;<\/p>\n<div class=\"warning\">Warning!!<br \/>\nThis method of setting the password is Legacy. While still supported, it is not recommended.<br \/>\nThe problem with the enable password is that it can be viewed with the show command:<\/p>\n<pre>Sw1#<span style=\"color: #00ffff;\">show running-config<\/span>\r\nCurrent configuration : 1047 bytes\r\n!\r\nversion 12.1\r\nno service timestamps log datetime msec\r\nno service timestamps debug datetime msec\r\nno service password-encryption\r\n!\r\nhostname Sw1\r\n!\r\n<i><strong>enable password PassWord<\/strong><i>\r\n...<\/i><\/i><\/pre>\n<\/div>\n<p>The correct way to set the password with &#8220;enable secret&#8221;<\/p>\n<pre>Sw1#<span style=\"color: #00ffff;\">conf t<\/span>\r\nSw1(config)#<span style=\"color: #00ffff;\">enable secret PassWord1<\/span>\r\nSw1(config)#<span style=\"color: #00ffff;\">exit<\/span>\r\nSw1#<span style=\"color: #00ffff;\">show running-config<\/span>\r\nBuilding configuration...\r\n\r\nCurrent configuration : 1094 bytes\r\n!\r\nversion 12.1\r\nno service timestamps log datetime msec\r\nno service timestamps debug datetime msec\r\nno service password-encryption\r\n!\r\nhostname Sw1\r\n!\r\n<b><i>enable secret 5 $1$mERr$6vfnIkQf0hZSmJZv6YXRj0<\/i><\/b>\r\nenable password PassWord ...\r\n<\/pre>\n<div class=\"notice\">1. The password and the secret cannot be the same.<br \/>\n2. The secret supersedes the password, meaning the password will no longer function.<\/div>\n<p>3. Finally, to remove the password:<\/p>\n<pre>Sw1(config)#<span style=\"color: #00ffff;\">no enable password<\/span><\/pre>\n<h4>Set a password for the Console Port<\/h4>\n<pre>Sw1(config)#<span style=\"color: #00ffff;\">line console 0<\/span>\r\nSw1(config-line)#<span style=\"color: #00ffff;\">password PASSWORD<\/span>\r\nSw1(config-line)#<span style=\"color: #00ffff;\">login\r\n<\/span><\/pre>\n<h4>Set a password for Telnet<\/h4>\n<ul>\n<li>vty = Virtual Terminal<\/li>\n<li>0 = 1st telnet port (Session?)<\/li>\n<li>4 = 5th telnet port<\/li>\n<li>All changes will affect ports 0 &#8211; 4<\/li>\n<\/ul>\n<pre>Sw1(config)#<span style=\"color: #00ffff;\">line vty 0 4<\/span>\r\nSw1(config-line)#<span style=\"color: #00ffff;\">password PASSWORD<\/span>\r\nSw1(config-line)#<span style=\"color: #00ffff;\">login\r\n<\/span><\/pre>\n<h4>Disable the Telnet Password<\/h4>\n<pre>Sw1(config)#<span style=\"color: #00ffff;\">line vty 0<\/span>\r\nSw1(config-line)#<span style=\"color: #00ffff;\">no login<\/span><\/pre>\n<h4>Hide all Passwords<\/h4>\n<pre>Sw1(config)#<span style=\"color: #00ffff;\">service password-encryption<\/span><\/pre>\n<div class=\"warning\">This is Level 7 encryption and is easily cracked! (Check &#8220;cisco password crack&#8221;). Do not use it in place of the enable secret, but it is required for the Console and vty ports.<\/div>\n<h4>Set a Warning Banner<\/h4>\n<div class=\"notice\">Some type of legal message warning hackers to stay out is important. &#8220;Welcome&#8221; legally says, &#8220;You are welcome to do what you want here.&#8221;<br \/>\nOnly a basic message saying unauthorized access is prohibited is required for legal purposes.<\/div>\n<p>Login Banner<br \/>\nThis only displays with the console session.<\/p>\n<p>Message of the Day<\/p>\n<pre>Sw1(config)#<span style=\"color: #00ffff;\">banner motd ?<\/span>\r\nLINE   c banner-text c. where 'c' is a delimiting character\r\nSw1(config)#<span style=\"color: #00ffff;\">banner motd [\r\nEnter TEXT message.  End with the character '['.\r\n\r\n********\r\nDo Not Log On!!\r\n******** \r\n\r\n[\r\n<\/span><\/pre>\n<div class=\"warning\">\n<p>The problem with Telent<\/p>\n<p>The primary issue with Telent is that all data transmitted and received is sent unencrypted. Anyone with a packet sniffer will be able to clearly see everything you type!<\/p>\n<\/div>\n<h3>Understanding SSH<\/h3>\n<p>Telnet with Encryption<\/p>\n<ul>\n<li>Requires a username AND password, where telnet only requires a password<\/li>\n<li>Also requires a domain name to create an encryption certificate<\/li>\n<\/ul>\n<pre>Sw1(config)#<span style=\"color: #00ffff;\">username USERNAME password PASSWORD<\/span>\r\nSw1(config)#<span style=\"color: #00ffff;\">ip domain-name DOMAIN.COM<\/span>\r\nSw1(config)#<span style=\"color: #00ffff;\">crypto key generate rsa<\/span>\r\nThe name for the keys will be: HOSTNAME.DOMAIN.COM\r\nChoose the size of the key modulus in the range of 360 to 2048 for your\r\n  General Purpose Keys.  Choosing a key modulus greater than 512 may take\r\n  a few minutes.\r\n\r\nHow many bits in the modulus [512]: <span style=\"color: #00ffff;\">1024<\/span>\r\n% Generating 1024 bit RSA keys.  keys will be non-exportable...[OK]\r\n\r\nSw1(config)#<span style=\"color: #00ffff;\">ip ssh version 2<\/span>\r\nSw1(config)#<span style=\"color: #00ffff;\">line vty 0 4<\/span>\r\nSw1(config-line)#<span style=\"color: #00ffff;\">transport input ssh<\/span>\r\n<\/pre>\n<div class=\"notice\">\n<p>To use ssh with the Cisco Packet Tracer, use the following command:<\/p>\n<pre>Pc0&gt;<span style=\"color: #00ffff;\">ssh -l USERNAME IP.ADD.RE.SS<\/span>\r\nOpen\r\nPassword:<span style=\"color: #00ffff;\"><em>PASSWORD<\/em><\/span><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<h3>Setting Up Port Security<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>Configuring Passwords on a Cisco Switch The first time you attempt to Telnet, you will be denied because no passwords have been set. Passwords must be set via the terminal: Sw1&gt;enable Sw1#conf t Sw1(config)#enable password PassWord Test the new password by exiting back to User Mode, then attempt to enter Privilege mode. Sw1(config)#exit Sw1#disable Sw1&gt;enable ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/?p=89\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,2,6,5],"tags":[],"class_list":["post-89","post","type-post","status-publish","format-standard","hentry","category-ccent","category-networking","category-security","category-switches"],"_links":{"self":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/89","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=89"}],"version-history":[{"count":22,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/89\/revisions"}],"predecessor-version":[{"id":128,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/89\/revisions\/128"}],"wp:attachment":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=89"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=89"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}