1 00:00:00,321 --> 00:00:06,667 In the previous video, we have done connecting ubuntu server with router inside gns3. 2 00:00:07,254 --> 00:00:13,757 Next in this video, we are going to configure ssh on the router 1 and router 2, 3 00:00:14,141 --> 00:00:18,490 so we can remote router 1 and router 2 from ubuntu. 4 00:00:19,029 --> 00:00:28,134 Let’s start with router 1. First, we need to change the domain name, ip doman-name 5 00:00:29,574 --> 00:00:37,880 and then the domain, let’s say here I use mydomain.local, you are free to use anything. 6 00:00:38,992 --> 00:00:46,418 Next, let’s generate a key for ssh, crypto key generate rsa, 7 00:00:48,286 --> 00:00:58,646 here for the modulus by default is 512, but the best practice is to use 1024. 8 00:01:01,597 --> 00:01:08,157 Next let’s create username and password, username and then the username, 9 00:01:08,157 --> 00:01:19,486 let’s say here I create username cisco, and then privilege 15, if we configure privilege to 15 like this, 10 00:01:19,486 --> 00:01:27,501 when this user login, the user will directly go to privilege mode, not user mode. 11 00:01:28,069 --> 00:01:35,581 And then secret, here we need to put the password, let’s say the password is also cisco. 12 00:01:36,898 --> 00:01:40,256 Last let’s configure the vty. 13 00:01:40,475 --> 00:01:46,563 Line vty 0 15, and then login local. 14 00:01:47,238 --> 00:01:51,506 Okay now we have done configuring ssh on router 1. 15 00:01:52,432 --> 00:01:56,496 Let’s try to ssh from ubuntu server to router 1, 16 00:01:58,163 --> 00:02:06,669 ssh cisco@10.10.10.1, this is the ip address of router 1. 17 00:02:08,018 --> 00:02:13,210 Okay here we get an error, this is because the router 18 00:02:13,210 --> 00:02:20,354 is to old, so the key between ubuntu server and router is not match. 19 00:02:20,642 --> 00:02:26,600 To solve this problem, we need to doing some configuration on the ubuntu server. 20 00:02:27,938 --> 00:02:31,902 nano .ssh/config 21 00:02:33,501 --> 00:02:36,445 Here we need to add some configuration, 22 00:02:36,875 --> 00:02:44,360 Host and then the ip address of the router. Which is 10.10.10.1 23 00:02:44,926 --> 00:02:51,893 Here we can Tab, and then here we need to type KexAlgorithms 24 00:02:54,862 --> 00:02:59,554 and then + and then the error message that we get. 25 00:02:59,893 --> 00:03:03,336 You can just type the configuration like this. 26 00:03:04,120 --> 00:03:11,234 Okay we have done here, let’s save it, ctrl + x , y, enter. 27 00:03:12,054 --> 00:03:22,054 Let’s ssh to router 1 again, okay we get an error unsupported algorithms. 28 00:03:22,560 --> 00:03:25,917 I think we do a mistake in the configuration. 29 00:03:26,198 --> 00:03:33,896 Let’s edit the file again, here we can put # to comment the configuration, 30 00:03:34,475 --> 00:03:39,195 so now this configuration is not used. Save it, ctrl + x, y, enter. 31 00:03:39,901 --> 00:03:41,946 Let’s ssh again, 32 00:03:42,992 --> 00:03:47,230 Okay here we can see the error message, let’s write this 33 00:03:47,230 --> 00:03:52,078 so we can see the error message when configuring on ubuntu server, 34 00:04:05,232 --> 00:04:08,394 Now let’s configure ubuntu server again, nano .ssh/config, 35 00:04:09,661 --> 00:04:11,449 Uncomment this, 36 00:04:14,286 --> 00:04:18,994 And then here we missing I in the algorithms. 37 00:04:23,160 --> 00:04:24,354 Save it, ctrl + x, y, enter. 38 00:04:25,174 --> 00:04:33,291 Now let’s ssh to the router 1 again, okay here we can see that we get another error, 39 00:04:33,690 --> 00:04:46,142 no matching cipher found, their offer aes128, 3des, aes192, or aes256. 40 00:04:46,656 --> 00:04:57,488 So we need to add a configuration again, let’s say we will use the last one, which is aes256-cbc. 41 00:04:58,206 --> 00:05:09,752 Nano .ssh/config, let’s add the configuration here, cipher +aes256-cbc. 42 00:05:14,861 --> 00:05:15,966 Save it, ctrl + x, y, enter. 43 00:05:17,349 --> 00:05:25,400 Let’s try to ssh to router 1 again, okay here we can see that we don’t get an error anymore. 44 00:05:25,813 --> 00:05:35,102 Yes, let’s type the password and here we are success to remote router 1 using ssh. 45 00:05:35,733 --> 00:05:39,582 To exit from router 1, just type exit. 46 00:05:41,035 --> 00:05:49,546 Okay now we have done configuring ssh on router 1, next let’s configure ssh on router 2. 47 00:05:50,883 --> 00:05:54,019 First let’s configure the domain name, 48 00:05:54,309 --> 00:06:01,682 Ip domain-name and then the domain, let’s say I use mydomain.local. 49 00:06:02,192 --> 00:06:14,186 Next, let’s create the key, crypto key generate rsa, for the modulus, I use 1024. 50 00:06:14,789 --> 00:06:23,886 Next let’s create the username, username cisco privilege 15 secret cisco. 51 00:06:25,189 --> 00:06:33,456 Last, let’s configure vty, line vty 0 15. Login local, 52 00:06:33,989 --> 00:06:38,083 Okay we have done configuring ssh on router 2, 53 00:06:38,526 --> 00:06:48,786 Let’s try to remote the router 2 from ubuntu server, ssh cisco@10.10.10.2, 54 00:06:49,552 --> 00:06:53,741 Okay here we get an error like in the router 1. 55 00:06:54,133 --> 00:07:02,555 Let’s configure on ubuntu again, here we can add the configuration for router 2, 56 00:07:02,976 --> 00:07:10,323 the configuration will be same as router 1, the only differences is in the host. 57 00:07:11,078 --> 00:07:13,884 But if we have many router, 58 00:07:13,884 --> 00:07:20,506 absolutely this is not effective if we need to add the configuration for each router. 59 00:07:21,050 --> 00:07:29,237 The solution is, we can change the ip address become stars. This is means all host. 60 00:07:29,870 --> 00:07:30,829 Save it, ctrl + x, y, enter. 61 00:07:32,701 --> 00:07:40,542 Now let’s try to ssh to router 2 again, okay we are success here. 62 00:07:41,435 --> 00:07:45,179 Okay, now we have done configuring ssh on router 1 63 00:07:45,179 --> 00:07:52,157 and router 2, and now we are success remote the router from ubuntu server. 64 00:07:52,584 --> 00:07:55,323 I think enough for this video 65 00:07:55,395 --> 00:07:58,955 Thank you for watching and see you on the next video.