This document discusses managing the SSH service in Linux. It begins by explaining what SSH is and its default configuration. It then provides steps to start and check the status of the SSH service, access remote machines using SSH, and view currently logged in users. It also demonstrates how to change the default SSH port number in the configuration file and reload firewall rules and SELINUX settings. Finally, it briefly mentions setting up SSH key-based authentication by generating keys and copying them to remote machines.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
68 views7 pages
RHCSA-16 Configuring and Securing SSH Service
This document discusses managing the SSH service in Linux. It begins by explaining what SSH is and its default configuration. It then provides steps to start and check the status of the SSH service, access remote machines using SSH, and view currently logged in users. It also demonstrates how to change the default SSH port number in the configuration file and reload firewall rules and SELINUX settings. Finally, it briefly mentions setting up SSH key-based authentication by generating keys and copying them to remote machines.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7
Redhat Certified System Administrator
Technology Course RH-124
(RHCSA)
BY- Ankit Shukla
Managing SSH Service in Linux What is SSH(Secure Shell) ? SSH stands for Secure Shell is a network protocol, used to access remote machine in order to execute command-line network services and other commands over a Network. OpenSSH effectively eliminate eavesdropping, connection hijacking, and other attacks. OpenSSH provides secure tunneling and several authentication methods. By default it must be listening on port 22 TCP/IP. SSH configuration file is stored in /etc/ssh/ directory as sshd_config. Daemons name sshd.
Configuring SSH Service :-
Before starting ssh configuration, TCP/IP setting should be proper configured, as I discussed previous . [root@srv ~]# rpm -qa | grep openssh “verify open ssh package ” openssh-6.6.1p1-31.el7.x86_64 openssh-server-6.6.1p1-31.el7.x86_64 openssh-clients-6.6.1p1-31.el7.x86_64 Managing SSH Service in Linux [root@srv ~]# systemctl start sshd “start ssh service” [root@srv ~]# systemctl status sshd “verify ssh service running or not” [root@srv ~]# ssh [email protected] “Access remote device using ssh” [root@srv ~]# w –f “To display a list of user currently log on”
• Change Default Port Number of SSH-
[root@srv ~]# vim /etc/ssh/sshd_config “find #port no 22 line and edit”
[root@srv ~]# cat /etc/ssh/sshd_config | grep ^Port “port no changed”
Port 2245 Managing SSH Service in Linux To add port no. in SELINUX :- [root@srv ~]# semanage port -a -t ssh_port_t -p tcp 2245
Add port no. in firewall :-
[root@srv ~]# firewall-cmd --permanent --zone=public - -add-port=2245/tcp [root@srv ~]# firewall-cmd --reload Managing SSH Service in Linux SSH Key Based Authentication- [root@srv ~]# ssh-keygen “to generate secure key for authentication” Managing SSH Service in Linux [root@srv ~]# ssh-copy-id 192.168.10.50 “copy ssh key to remote machine”