SSH stands for Secure Shell is a network protocol, used to access remote machine. Here network security engineer interview questions and answers pdf this article, we are presenting 10 SSH Questions and thier Answers. SSH is configured on what Port Number, by default? How to change the port of SSH?
SSH is configured on port 22, by default. We can change or set custom port number for SSH in configuration file. We can check port number of SSH by running the below one liner script, directly on terminal. Save the file and restart the SSH service to take the changes into effect. The above action can be implemented in the configuration file. SSH service as show above. Both SSH and Telnet are network Protocol.
Both the services are used in order to connect and communicate to another machine over Network. SSH uses Port 22 and Telnet uses port 23 by default. Telnet send data in plain text and non-encrypted format everyone can understand whereas SSH sends data in encrypted format. Not to mention SSH is more secure than Telnet and hence SSH is preferred over Telnet.
We need to use ssh-keygen technology to create public and private keys. Copy public keys to remote host using the command below. How will you allows users and groups to have access to SSH Sever? Here again we need to edit the configuration file of SSH service. Open the configuration file and add users and groups at the bottom as show below and then, restart the service. And add your custom message in this file. Protocol 1 and Protocol 2.
Protocol 1 is older than protocol 2. Protocol 1 is less secure than protocol 2 and should be disabled in the config file. Save the configuration file and restart the service. We can make a filter using the grep command as shown below. The grep command can be tweaked in any other way to produce the same result.