1
00:00:01,100 --> 00:00:03,380
Hey, welcome back to this video.

2
00:00:03,680 --> 00:00:08,420
So in this video, we're going to see how you can perform a search.

3
00:00:08,600 --> 00:00:17,930
Now, a search is used to do a remote login into another host device or, in simple words, another

4
00:00:17,930 --> 00:00:19,700
Linux operating system.

5
00:00:20,390 --> 00:00:20,840
All right.

6
00:00:20,840 --> 00:00:22,610
So let's see how to do it.

7
00:00:22,730 --> 00:00:28,970
So in this lesson, we are going to perform three different ways to do a search.

8
00:00:29,150 --> 00:00:31,280
So let's quickly begin with.

9
00:00:31,490 --> 00:00:39,080
Now, as you can see on the screen, this is my OS number one or host one, which is the Mac OS.

10
00:00:39,290 --> 00:00:47,320
And I also have my second OS, which is the host two, which is the pirate OS.

11
00:00:47,330 --> 00:00:48,020
Perfect.

12
00:00:48,140 --> 00:00:56,000
So now I'm going to log in into my parrot OS, which is this operating system from my host one, which

13
00:00:56,000 --> 00:00:57,770
is the Mac operating system.

14
00:00:58,340 --> 00:01:05,420
Now let me quickly see the IP address of this device to home, which we are going to log in and you

15
00:01:05,420 --> 00:01:11,240
can see the IP was one 92.1 60 8.0. 69.

16
00:01:11,570 --> 00:01:20,510
Now to log in into the remote device, we are going to use the command, which is SSH and the IP address

17
00:01:20,510 --> 00:01:27,500
of the remote host, which is the host to in our case, which is our parrot operating system.

18
00:01:28,010 --> 00:01:36,920
Now, once we give the IP address, we simply need to hit enter and we can see it will by default give

19
00:01:36,920 --> 00:01:42,460
route at the rate the IP address and it is asking for a password prompt.

20
00:01:42,470 --> 00:01:48,800
Now it is by default trying as to login into the default user, which is Rohit.

21
00:01:48,830 --> 00:01:49,520
Now.

22
00:01:50,510 --> 00:01:57,020
Once I give the correct password, I will be able to successfully login into the operating system.

23
00:01:57,020 --> 00:02:04,850
As you can see, Rohit added Parrot and I'm successfully logged in into the remote OS and I can control

24
00:02:04,850 --> 00:02:06,920
the whole operating system from here.

25
00:02:06,950 --> 00:02:07,640
Perfect.

26
00:02:07,730 --> 00:02:13,700
Now let me simply exit from here, which is basically log out and the connection gets closed.

27
00:02:13,850 --> 00:02:20,690
So we have seen the first way, which was simply a search and the IP address of the remote host.

28
00:02:20,720 --> 00:02:21,380
Now.

29
00:02:22,300 --> 00:02:26,170
In case you need to log in through a specific user.

30
00:02:26,170 --> 00:02:29,380
Only in our first case it was Rohit.

31
00:02:29,440 --> 00:02:33,330
But let's say I want to log in using an admin user.

32
00:02:33,340 --> 00:02:40,990
So for that you can simply specify the name of the user, add the rate, the IP address of the remote

33
00:02:41,020 --> 00:02:41,560
host.

34
00:02:41,560 --> 00:02:48,100
So as you can see as a such admin, add the rate IP address of the remote host where we want to log

35
00:02:48,100 --> 00:02:54,940
in, just specify the password and you will be able to log into the remote machine.

36
00:02:54,940 --> 00:03:02,560
As you can see, I have successfully logged in now I have typed the command, which is who am I to confirm?

37
00:03:02,560 --> 00:03:07,300
And you can see the user which has successfully logged in as admin.

38
00:03:07,300 --> 00:03:07,990
Perfect.

39
00:03:08,920 --> 00:03:13,960
So this was our second way to do a search using a username.

40
00:03:14,020 --> 00:03:22,750
Now let us see the third way in which we are going to search into the remote host using the default

41
00:03:22,750 --> 00:03:23,770
port number.

42
00:03:24,310 --> 00:03:33,670
Now we always know that search uses the default port, which is port 22, which you can specify using

43
00:03:33,670 --> 00:03:40,330
the flag hyphen P, which stands for the port number and the port number is 22.

44
00:03:40,360 --> 00:03:46,990
Now I will simply hit enter and it will ask me for a password prompt and I will specify the password

45
00:03:47,500 --> 00:03:50,530
and you can see I have successfully logged in into the machine.

46
00:03:50,800 --> 00:03:52,840
Now let us do one thing.

47
00:03:52,840 --> 00:03:55,150
Let's try to change the port number.

48
00:03:55,660 --> 00:04:02,530
This is basically a configuration which is done many times by sysadmins wherein they do not want some

49
00:04:02,530 --> 00:04:06,400
random persons to try to do a search login.

50
00:04:06,850 --> 00:04:14,470
That is the main reason they most of the times change the port numbers of these services like SSH.

51
00:04:14,470 --> 00:04:20,230
So by default no other random people are trying to brute force the search logins.

52
00:04:20,710 --> 00:04:23,200
So let's see how to change the port number.

53
00:04:23,320 --> 00:04:26,320
It is through the ssh configuration file.

54
00:04:26,320 --> 00:04:32,610
So nano slash etsy slash search slash search d config.

55
00:04:32,620 --> 00:04:40,630
And here you can see I have modified the port number and I have written it as Port 69 and I'm just going

56
00:04:40,630 --> 00:04:41,480
to save the file.

57
00:04:41,500 --> 00:04:48,280
Now, remember, once you have modified the configuration file, you need to restart the SSH service

58
00:04:48,550 --> 00:04:52,630
for which the command is surface ssh restart.

59
00:04:53,290 --> 00:04:58,690
Once we do that, our search changes get replicated into the system.

60
00:04:58,720 --> 00:05:06,280
Now let's quickly see the status of the service if it is running fine and our changes have been modified

61
00:05:06,280 --> 00:05:07,540
or reflected or no.

62
00:05:07,540 --> 00:05:14,200
So let us just confirm that the search server has started on Port 69 or no?

63
00:05:14,230 --> 00:05:16,360
Or is it still running on 22?

64
00:05:16,720 --> 00:05:23,500
So just hit status and you can see it is active running and the new port number is 69, as we can see

65
00:05:23,500 --> 00:05:24,310
over here.

66
00:05:24,340 --> 00:05:25,060
Perfect.

67
00:05:25,150 --> 00:05:29,590
Now our set server has configured correctly on our new port.

68
00:05:29,740 --> 00:05:31,840
So now let us try to log in again.

69
00:05:32,260 --> 00:05:38,980
But this time when we try to log in into the port 22, you can see we get an error which is connection

70
00:05:38,980 --> 00:05:45,100
refused because we know that SSH is not running on the default port, which is 22.

71
00:05:45,100 --> 00:05:48,460
Now, does it say connection refuse?

72
00:05:48,460 --> 00:05:56,140
The port is not accepting any connections and we know that we have just now modified the port number

73
00:05:56,140 --> 00:05:58,300
and the new port number is six nine.

74
00:05:58,300 --> 00:06:05,560
So let us try to connect onto our new port that is six nine and hit enter and you can see it immediately

75
00:06:05,560 --> 00:06:07,870
gave a prompt to give the password.

76
00:06:08,140 --> 00:06:13,810
When the user gives the right password, he is able to successfully log in and you can see who am I

77
00:06:13,840 --> 00:06:17,560
say is the user which is currently logged in as admin.

78
00:06:17,920 --> 00:06:23,200
So I hope you guys understood how you can do a search to the host.

79
00:06:23,200 --> 00:06:29,830
You can do a search using the second method that was using the name of the host, and the third way

80
00:06:29,830 --> 00:06:36,280
was using the port number in case the SSH service is not running on the default port.

81
00:06:36,670 --> 00:06:37,900
I hope you guys understood.

82
00:06:37,930 --> 00:06:38,650
Thank you.
