How To Configure Openssh In Linux 7

SSH server is use for the parpose Remote Login between Linux to Linux and Linux to Unix Machine.

Service Profile :-

A. Packages
open ssh-server [server side]
open ssh-clients [client side]

B. Service
sshd

C. Configuration file
/etc/ssh/sshd_config

D. Port Number
22

 [SERVER SIDE]

#yum -y install openssh*
(install package)

#firewall-cmd --permanent --add-service=ssh

#firewall-cmd -reload
(allow in firewall)

#useradd raj (Create user)
#passwd raj (set password on raj user)
#useradd raj1 (Create user)
#passwd raj1 (set password on raj1 user)

  [CLIENT SIDE]

#ssh username@ip
example :- ssh raj@172.25.2.11

(Login with raj user)

#who
(you see who are remotely login with you)


 For Extra Security

[SERVER SIDE]

#vim /etc/hosts.allow

entry :-   sshd     :               172.25.2.0/24
(you give a permission for only 172.25.2.0/24 network connect with you and other not connect)

#vim /etc/hosts.deny

entry :-   sshd     :               ALL
(you give a permission for any network not connect with you but '172.25.2.0/24'  this network connect with you because you give this network permission in /etc/hosts.allow)


you also watch my video :-

Comments

Popular Posts