CentOS SSH Installation And Configuration
2012-02-23 07:56
381 查看
CentOS SSH Installation And Configuration
How do I install and configure ssh server and client under CentOS Linux operating systems?
You need to install the following packages (which are installed by default until and unless you removed it or skipped it while installing CentOS)
openssh-clients : The OpenSSH client applications
openssh-server : The OpenSSH server daemon
Start the service:
Make sure port 22 is opened:
Add the line
If you want to restict access to 192.168.1.0/24, edit it as follows:
If your site uses IPv6, and you are editing ip6tables, use the line:
Save and close the file. Restart iptables:
To disable root logins, edit or add as follows:
Restrict login to user tom and jerry only over ssh:
Change ssh port i.e. run it on a non-standard port like 1235
Save and close the file. Restart sshd:
CentOS SSH Installation And Configuration
by Vivek Gite on March 14, 2009 · 3 commentsHow do I install and configure ssh server and client under CentOS Linux operating systems?
You need to install the following packages (which are installed by default until and unless you removed it or skipped it while installing CentOS)
openssh-clients : The OpenSSH client applications
openssh-server : The OpenSSH server daemon
OpenSSH Installations under CentOS Linux
To install the server and client type:# yum -y install openssh-server openssh-clients
Start the service:
# chkconfig sshd on # service sshd start
Make sure port 22 is opened:
# netstat -tulpn | grep :22
Firewall Settings
Edit /etc/sysconfig/iptables (IPv4 firewall),# vi /etc/sysconfig/iptables
Add the line
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
If you want to restict access to 192.168.1.0/24, edit it as follows:
-A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 22 -j ACCEPT
If your site uses IPv6, and you are editing ip6tables, use the line:
-A RH-Firewall-1-INPUT -m tcp -p tcp --dport 22 -j ACCEPT
Save and close the file. Restart iptables:
# service iptables restart
OpenSSH Server Configuration
Edit /etc/ssh/sshd_config, enter:# vi /etc/ssh/sshd_config
To disable root logins, edit or add as follows:
PermitRootLogin no
Restrict login to user tom and jerry only over ssh:
AllowUsers tom jerry
Change ssh port i.e. run it on a non-standard port like 1235
Port 1235
Save and close the file. Restart sshd:
# service sshd restart
相关文章推荐
- CentOS SSH Installation And Configuration
- Dovecot installation and configuration on CentOS
- HAProxy Installation and Configuration on CentOS 6.4 to Mitigate The Effects of Abusive Clients--转
- HAProxy Installation and Configuration on CentOS 6.4 to Mitigate The Effects of Abusive Clients--转
- 「2013-1-23」CentOS 5.5 x86_64 Installation and Configuration (for Univ. Labs)
- skpye 4.3 installation and configuration in linux CentOS 7 / RHEL 7 / Fedora 20
- Installation and Configuration MySQL Cluster 7.2 on CentOS 5 (include MySQL 5.5)
- Static Source Code Analysis Tools: PMD’s Installation and configuration
- mod_dav Installation and Configuration
- Full Qmail Installation and Configuration Guide
- Oracle GoldenGate Veridata Installation and Configuration
- PowerCenter - Installation and Configuration (8.6.1 for Windows 32Bit)
- SolrCloud 5.2.1 installation and configuration
- [Installation and Configuration][Informatica 8.6.1][Windows 2003] Informatica服务器端及客户端安装配置
- tomcat installation and configuration guide
- Red Hat Enterprise MRG 2.0 Installation And Configuration Guide
- Step-by-Step:Installation and Configuration of a secure web application using MySQL,OpenSA Web Server, Tomcat and OpenSSL,on a N
- PCL Installation and Configuration on OSX