{"id":716,"date":"2015-04-15T07:57:54","date_gmt":"2015-04-15T16:57:54","guid":{"rendered":"http:\/\/blog.box.kr\/?p=716"},"modified":"2015-04-15T07:57:54","modified_gmt":"2015-04-15T16:57:54","slug":"centos-ssh-installation-and-configuration","status":"publish","type":"post","link":"https:\/\/blog.box.kr\/?p=716","title":{"rendered":"CentOS SSH Installation And Configuration"},"content":{"rendered":"<p><a href=\"http:\/\/www.cyberciti.biz\/faq\/centos-ssh\/\">http:\/\/www.cyberciti.biz\/faq\/centos-ssh\/<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span class=\"drop_cap\">H<\/span>ow do I install and configure ssh server and client under CentOS Linux operating systems?<br \/>\n<span id=\"more-6774\"><\/span><br \/>\nYou need to install the following packages (which are installed by default until and unless you removed it or skipped it while installing CentOS)<\/p>\n<ul>\n<li>openssh-clients : The OpenSSH client applications<\/li>\n<li>openssh-server : The OpenSSH server daemon<\/li>\n<\/ul>\n<h2>OpenSSH Installations under CentOS Linux<\/h2>\n<p>To install the server and client type:<br \/>\n<code># yum -y install openssh-server openssh-clients<\/code><br \/>\nStart the service:<br \/>\n<code># chkconfig sshd on<br \/>\n# service sshd start<\/code><br \/>\nMake sure port 22 is opened:<br \/>\n<code># netstat -tulpn | grep :22<\/code><\/p>\n<h3>Firewall Settings<\/h3>\n<p>Edit \/etc\/sysconfig\/iptables (IPv4 firewall),<br \/>\n<code># vi \/etc\/sysconfig\/iptables<\/code><br \/>\nAdd the line<br \/>\n<code>-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT<\/code><br \/>\nIf you want to restict access to 192.168.1.0\/24, edit it as follows:<br \/>\n<code>-A RH-Firewall-1-INPUT -s 192.168.1.0\/24 -m state --state NEW -p tcp --dport 22 -j ACCEPT<\/code><br \/>\nIf your site uses IPv6, and you are editing ip6tables, use the line:<br \/>\n<code>-A RH-Firewall-1-INPUT -m tcp -p tcp --dport 22 -j ACCEPT<\/code><br \/>\nSave and close the file. Restart iptables:<br \/>\n<code># service iptables restart<\/code><\/p>\n<h2>OpenSSH Server Configuration<\/h2>\n<p>Edit \/etc\/ssh\/sshd_config, enter:<br \/>\n<code># vi \/etc\/ssh\/sshd_config<\/code><br \/>\nTo disable root logins, edit or add as follows:<br \/>\n<code>PermitRootLogin no<\/code><br \/>\nRestrict login to user tom and jerry only over ssh:<br \/>\n<code>AllowUsers tom jerry<\/code><br \/>\nChange ssh port i.e. run it on a non-standard port like 1235<br \/>\n<code>Port 1235<\/code><br \/>\nSave and close the file. Restart sshd:<br \/>\n<code># service sshd restart<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/www.cyberciti.biz\/faq\/centos-ssh\/ &nbsp; 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 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 &#8211;state NEW -m tcp -p tcp &#8211;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 &#8211;state NEW -p tcp &#8211;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 &#8211;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"ngg_post_thumbnail":0,"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[5,7],"tags":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5q9Zn-by","jetpack-related-posts":[{"id":714,"url":"https:\/\/blog.box.kr\/?p=714","url_meta":{"origin":716,"position":0},"title":"HOW TO INSTALL PUPPET ON CENTOS7","date":"2015-04-15","format":false,"excerpt":"https:\/\/garage.godaddy.com\/tech\/config\/install-puppet-centos7\/ Puppet is a configuration management tool designed to allow users to define the state of complex IT infrastructures in the easiest way possible. Once those definitions are created, Puppet will automatically enforce those rules across each node. After installation, a Puppet agent is placed on every server, device and\u2026","rel":"","context":"In &quot;\uae30\uc220\uc790\ub8cc&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":698,"url":"https:\/\/blog.box.kr\/?p=698","url_meta":{"origin":716,"position":1},"title":"Securing Svnserve using SSH","date":"2015-04-15","format":false,"excerpt":"http:\/\/tortoisesvn.net\/ssh_howto.html Securing Svnserve using SSH This section provides a step-by-step guide to setting up Subversion and TortoiseSVN to use the svn+ssh protocol. If you already use authenticated SSH connections to login to your server, then you are already there and you can find more detail in the Subversion book. If\u2026","rel":"","context":"In &quot;\uae30\uc220\uc790\ub8cc&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":775,"url":"https:\/\/blog.box.kr\/?p=775","url_meta":{"origin":716,"position":2},"title":"Setup mail server on centos 7","date":"2015-05-12","format":false,"excerpt":"This article helps you to install and configure basic mail server on Centos 7. Here i have used Postfix for SMTP, Dovecot for POP\/IMAP and Dovecot SASL for SMTP AUTH. Before proceeding please make sure you have assigned static IP for the server and have internet connectivity for installing packages.\u2026","rel":"","context":"In &quot;\uae30\uc220\uc790\ub8cc&quot;","img":{"alt_text":"Setup mail server on centos 7","src":"https:\/\/i0.wp.com\/1-ps.googleusercontent.com\/hk\/AwAJwg9ecIBNxEHGg0w8SfePD8\/www.krizna.com\/wp-content\/uploads\/2015\/01\/Setup_mail_server_centos_7.png.pagespeed.ce._so1uJb5qKCs4NSN7OOP.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":675,"url":"https:\/\/blog.box.kr\/?p=675","url_meta":{"origin":716,"position":3},"title":"[Linux] CentOS 7 \/ RHEL 7\uc5d0 redis \uc124\uce58 \ud558\uae30","date":"2015-04-13","format":false,"excerpt":"Project URL : http:\/\/redis.io\/ CentOS 7 and Red Hat Enterprise Linux 7\uc5d0\uc11c Redis\ub97c \uc124\uce58 \ud558\ub294 \ubc29\ubc95 EPEL \uc800\uc7a5\uc18c \ub4f1\ub85d \ud558\uae30 EPEL \uc800\uc7a5\uc18c\ub97c \uba3c\uc800 \ub4f1\ub85d\ud55c\ub2e4. wget -r --no-parent -A 'epel-release-*.rpm' http:\/\/dl.fedoraproject.org\/pub\/epel\/7\/x86_64\/e\/ rpm -Uvh dl.fedoraproject.org\/pub\/epel\/7\/x86_64\/e\/epel-release-*.rpm \/etc\/yum.repos.d\u00a0 \ud558\uc704 \ub514\ub809\ud1a0\ub9ac\uc5d0 \uc544\ub798\uc640 \uac19\uc774 2\uac1c\uc758 epel \uc800\uc7a5\uc18c\uac00 \ub4f1\ub85d\ub41c\ub2e4. 1. epel.repo 2.epel-testing.repo [root@localhost ~]# ls -l \/etc\/yum.repos.d\/\u2026","rel":"","context":"In &quot;\uae30\uc220\uc790\ub8cc&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":510,"url":"https:\/\/blog.box.kr\/?p=510","url_meta":{"origin":716,"position":4},"title":"[\ud38c]How to enable EPEL repo on CentOS 5 &amp; 6","date":"2014-12-28","format":false,"excerpt":"To enable EPEL (Extra Packages for Enterprise Linux) for CentOS 5 x86 or x64, log in to SSH on your server and execute the following command (dependent on your OS \u2013 unsure of what version of CentOS you are running?): \u00a0CentOS 6.x 32-bit (x86\/i386): rpm -Uvh http:\/\/mirror.overthewire.com.au\/pub\/epel\/6\/i386\/epel-release-6-7.noarch.rpm CentOS 6.x 64-bit\u2026","rel":"","context":"In &quot;Linux&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":826,"url":"https:\/\/blog.box.kr\/?p=826","url_meta":{"origin":716,"position":5},"title":"[scrap]50 UNIX \/ Linux Sysadmin Tutorials","date":"2015-05-20","format":false,"excerpt":"http:\/\/www.thegeekstuff.com\/2010\/12\/50-unix-linux-sysadmin-tutorials\/ \u00a0 Merry Christmas and Happy Holidays to all TGS Readers. To wrap this year, I\u2019ve collected 50 UNIX \/ Linux sysadmin related tutorials that we\u2019ve posted so far. This is lot of reading. Bookmark this article for your future reference and read it whenever you get free time. Disk\u2026","rel":"","context":"In &quot;\uae30\uc220&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts\/716"}],"collection":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=716"}],"version-history":[{"count":0,"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts\/716\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=716"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}