Experiment No:02: Sudo Yum - y Install Openssh-Server Openssh-Clients
Experiment No:02: Sudo Yum - y Install Openssh-Server Openssh-Clients
Experiment No:02: Sudo Yum - y Install Openssh-Server Openssh-Clients
Aim: - Installation and Configuration SSH Server (Red hat/CentOS and Ubuntu enable/disable root
login.)
Objectives:
1. Students should able to install SSH server and configure it on Computer System and even on virtual
environment
2. Students should able to Differentiate between secure and unsecure remote system access.
Theory:
sshd (OpenSSH Daemon or server) is the daemon program for ssh client. It is a free and open source
ssh server. ssh replaces insecure rlogin and rsh, and provide secure encrypted communications
between two untrusted hosts over an insecure network such as the Internet.
Installation steps to be followed:
1. Open the terminal application for system.
2. Type sudo apt-get install openssh-server
3. Enable the ssh service by typing sudo systemctl enable ssh
4. Start the ssh service by typing sudo systemctl start ssh
5. Test it by login into the system using ssh user@server-name
2. Client setting:
set hostname as client using following command
#hostnamectl set-hostname client
3. Server setting
set hostname as server using following command
#hostnamectl set-hostname server
4. Make entry inside /etc/hosts file for available machines in the network with their ip address and
hostname. As follows:
Open that file with vim editor i.e vim /etc/hosts
5. After completion of this reload the system daemon services. Using following command on both the
machines.
#systemctl daemon-reload
6. Now go to client machine and connect to server machine using ssh.
#ssh root@server
(you will be prompted to server machines shell )
Create any file in server machine using ssh and cross check it actual machine.
7. Now go to server machine and connect to client machine using ssh.
#ssh root@client
(you will be prompted to client machines shell )
Create any file in client machine using ssh and cross check it actual machine.
CONCLUSIONS:
In this Practical we learned how to enable SSH on a Linux server. Additionally, we configured SSH
rules to limit access.