In the previous video, we have done connecting ubuntu server with router inside gns3. 2
Next in this video, we are going to configure ssh on the router 1 and router 2, 3
so we can remote router 1 and router 2 from ubuntu. 4
Let’s start with router 1. First, we need to change the domain name, ip doman-name 5
and then the domain, let’s say here I use mydomain.local, you are free to use anything. 6
Next, let’s generate a key for ssh, crypto key generate rsa, 7
here for the modulus by default is 512, but the best practice is to use 1024. 8
Next let’s create username and password, username and then the username, 9
let’s say here I create username cisco, and then privilege 15, if we configure privilege to 15 like this, 10
when this user login, the user will directly go to privilege mode, not user mode. 11
And then secret, here we need to put the password, let’s say the password is also cisco. 12
Last let’s configure the vty. 13
Line vty 0 15, and then login local. 14
Okay now we have done configuring ssh on router 1. 15
Let’s try to ssh from ubuntu server to router 1, 16
ssh cisco@10.10.10.1, this is the ip address of router 1. 17
Okay here we get an error, this is because the router 18
is to old, so the key between ubuntu server and router is not match. 19
To solve this problem, we need to doing some configuration on the ubuntu server. 20
nano .ssh/config 21
Here we need to add some configuration, 22
Host and then the ip address of the router. Which is 10.10.10.1 23
Here we can Tab, and then here we need to type KexAlgorithms 24
and then + and then the error message that we get. 25
You can just type the configuration like this. 26
Okay we have done here, let’s save it, ctrl + x , y, enter. 27
Let’s ssh to router 1 again, okay we get an error unsupported algorithms. 28
I think we do a mistake in the configuration. 29
Let’s edit the file again, here we can put # to comment the configuration, 30
so now this configuration is not used. Save it, ctrl + x, y, enter. 31
Let’s ssh again, 32
Okay here we can see the error message, let’s write this 33
so we can see the error message when configuring on ubuntu server, 34
Now let’s configure ubuntu server again, nano .ssh/config, 35
Uncomment this, 36
And then here we missing I in the algorithms. 37
Save it, ctrl + x, y, enter. 38
Now let’s ssh to the router 1 again, okay here we can see that we get another error, 39
no matching cipher found, their offer aes128, 3des, aes192, or aes256. 40
So we need to add a configuration again, let’s say we will use the last one, which is aes256-cbc. 41
Nano .ssh/config, let’s add the configuration here, cipher +aes256-cbc. 42
Save it, ctrl + x, y, enter. 43
Let’s try to ssh to router 1 again, okay here we can see that we don’t get an error anymore. 44
Yes, let’s type the password and here we are success to remote router 1 using ssh. 45
To exit from router 1, just type exit. 46
Okay now we have done configuring ssh on router 1, next let’s configure ssh on router 2. 47
First let’s configure the domain name, 48
Ip domain-name and then the domain, let’s say I use mydomain.local. 49
Next, let’s create the key, crypto key generate rsa, for the modulus, I use 1024. 50
Next let’s create the username, username cisco privilege 15 secret cisco. 51
Last, let’s configure vty, line vty 0 15. Login local, 52
Okay we have done configuring ssh on router 2, 53
Let’s try to remote the router 2 from ubuntu server, ssh cisco@10.10.10.2, 54
Okay here we get an error like in the router 1. 55
Let’s configure on ubuntu again, here we can add the configuration for router 2, 56
the configuration will be same as router 1, the only differences is in the host. 57
But if we have many router, 58
absolutely this is not effective if we need to add the configuration for each router. 59
The solution is, we can change the ip address become stars. This is means all host. 60
Save it, ctrl + x, y, enter. 61
Now let’s try to ssh to router 2 again, okay we are success here. 62
Okay, now we have done configuring ssh on router 1 63
and router 2, and now we are success remote the router from ubuntu server. 64
I think enough for this video 65
Thank you for watching and see you on the next video.