{"id":611,"date":"2025-09-10T15:56:39","date_gmt":"2025-09-10T12:56:39","guid":{"rendered":"https:\/\/destek.narhost.com\/?p=611"},"modified":"2025-10-26T14:20:02","modified_gmt":"2025-10-26T11:20:02","slug":"centos-7-ssh-portu-nasil-degistirilir","status":"publish","type":"post","link":"https:\/\/narhost.com\/destek\/centos-7-ssh-portu-nasil-degistirilir\/","title":{"rendered":"Centos 7 SSH Portu Nas\u0131l De\u011fi\u015ftirilir?"},"content":{"rendered":"<p data-start=\"187\" data-end=\"345\">Sunucunuzun g\u00fcvenli\u011fini art\u0131rmak i\u00e7in SSH ba\u011flant\u0131 portunu de\u011fi\u015ftirmek istiyorsan\u0131z, <strong data-start=\"272\" data-end=\"283\">Narhost<\/strong> teknik ekibi olarak a\u015fa\u011f\u0131daki ad\u0131mlar\u0131 izlemenizi \u00f6neriyoruz.<\/p>\n<hr data-start=\"347\" data-end=\"350\" \/>\n<h3 data-start=\"352\" data-end=\"421\">1\ufe0f\u20e3 SSH ile Sunucuya Ba\u011flan\u0131n ve SSH Konfig\u00fcrasyon Dosyas\u0131n\u0131 A\u00e7\u0131n<\/h3>\n<p data-start=\"423\" data-end=\"524\">\u00d6ncelikle sunucunuza SSH ile ba\u011flan\u0131n ve a\u015fa\u011f\u0131daki komut ile SSH ayar dosyas\u0131n\u0131 nano edit\u00f6r\u00fcnde a\u00e7\u0131n:<\/p>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-bash\">yum install nano -y &amp;&amp; nano \/etc\/ssh\/sshd_config<br \/>\n<\/code><\/div>\n<\/div>\n<blockquote data-start=\"588\" data-end=\"666\">\n<p data-start=\"590\" data-end=\"666\"><strong data-start=\"590\" data-end=\"598\">Not:<\/strong> E\u011fer <code data-start=\"604\" data-end=\"610\">nano<\/code> kurulu de\u011filse, yukar\u0131daki komut nano&#8217;yu y\u00fckleyecektir.<\/p>\n<\/blockquote>\n<hr data-start=\"668\" data-end=\"671\" \/>\n<h3 data-start=\"673\" data-end=\"703\">2\ufe0f\u20e3 SSH Portunu De\u011fi\u015ftirin<\/h3>\n<p data-start=\"705\" data-end=\"840\">A\u00e7\u0131lan dosyada <code data-start=\"720\" data-end=\"730\">#Port 22<\/code> sat\u0131r\u0131n\u0131 bulun. Sat\u0131rdaki <code data-start=\"757\" data-end=\"760\">#<\/code> i\u015faretini kald\u0131r\u0131n ve 4 haneli istedi\u011finiz yeni port numaras\u0131n\u0131 yaz\u0131n. \u00d6rne\u011fin:<\/p>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-bash\">Port 3310<br \/>\n<\/code><\/div>\n<\/div>\n<p data-start=\"865\" data-end=\"979\">D\u00fczenlemeyi tamamlad\u0131ktan sonra, <code data-start=\"898\" data-end=\"908\">CTRL + X<\/code> ile \u00e7\u0131k\u0131\u015f yap\u0131n, <code data-start=\"926\" data-end=\"929\">Y<\/code> tu\u015funa basarak kaydedin ve <code data-start=\"957\" data-end=\"964\">Enter<\/code> ile onaylay\u0131n.<\/p>\n<hr data-start=\"981\" data-end=\"984\" \/>\n<h3 data-start=\"986\" data-end=\"1027\">3\ufe0f\u20e3 Firewall\u2019da Yeni SSH Portunu A\u00e7\u0131n<\/h3>\n<p data-start=\"1029\" data-end=\"1113\">Sunucunuzda aktif olan firewall\u2019a yeni portu ekleyin ve firewall\u2019u yeniden y\u00fckleyin:<\/p>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-bash\">firewall-cmd --permanent --zone=public --add-port=3310\/tcp<br \/>\nfirewall-cmd --reload<br \/>\n<\/code><\/div>\n<\/div>\n<blockquote data-start=\"1209\" data-end=\"1288\">\n<p data-start=\"1211\" data-end=\"1288\"><strong data-start=\"1211\" data-end=\"1219\">Not:<\/strong> <code data-start=\"1220\" data-end=\"1226\">3310<\/code> yazan yeri kendi belirledi\u011finiz port numaras\u0131 ile de\u011fi\u015ftirin.<\/p>\n<\/blockquote>\n<hr data-start=\"1290\" data-end=\"1293\" \/>\n<h3 data-start=\"1295\" data-end=\"1333\">4\ufe0f\u20e3 SSH Servisini Yeniden Ba\u015flat\u0131n<\/h3>\n<p data-start=\"1335\" data-end=\"1408\">Yapt\u0131\u011f\u0131n\u0131z de\u011fi\u015fikli\u011fin aktif olmas\u0131 i\u00e7in SSH servisini yeniden ba\u015flat\u0131n:<\/p>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-bash\">systemctl restart sshd.service<br \/>\n<\/code><\/div>\n<\/div>\n<hr data-start=\"1454\" data-end=\"1457\" \/>\n<h3 data-start=\"1459\" data-end=\"1506\">5\ufe0f\u20e3 Yeni Portun Aktif Oldu\u011funu Kontrol Edin<\/h3>\n<p data-start=\"1508\" data-end=\"1580\">SSH servisi yeni portta dinliyor mu diye a\u015fa\u011f\u0131daki komutla kontrol edin:<\/p>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-bash\">ss -tnlp | grep ssh<br \/>\n<\/code><\/div>\n<\/div>\n<p data-start=\"1615\" data-end=\"1680\">\u00c7\u0131kt\u0131da yeni port numaran\u0131z\u0131n listelendi\u011fini g\u00f6rmelisiniz. \u00d6rnek:<\/p>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre!\">LISTEN 0 128 *:3310 *:* <span class=\"hljs-built_in\">users<\/span>:((\"sshd\",<span class=\"hljs-number\">10783<\/span>,<span class=\"hljs-number\">3<\/span>))<br \/>\nLISTEN 0 128 :::3310 :::* <span class=\"hljs-built_in\">users<\/span>:((\"sshd\",<span class=\"hljs-number\">10783<\/span>,<span class=\"hljs-number\">4<\/span>))<br \/>\n<\/code><\/div>\n<\/div>\n<hr data-start=\"1791\" data-end=\"1794\" \/>\n<h3 data-start=\"1796\" data-end=\"1821\">\u26a0\ufe0f \u00d6nemli Hat\u0131rlatma:<\/h3>\n<ul data-start=\"1823\" data-end=\"2061\">\n<li data-start=\"1823\" data-end=\"1897\">\n<p data-start=\"1825\" data-end=\"1897\">Yeni port \u00fczerinden SSH ba\u011flant\u0131s\u0131n\u0131 test etmeden eski portu kapatmay\u0131n.<\/p>\n<\/li>\n<li data-start=\"1898\" data-end=\"1980\">\n<p data-start=\"1900\" data-end=\"1980\">G\u00fcvenlik duvar\u0131 ve di\u011fer a\u011f ayarlar\u0131n\u0131z\u0131n yeni porta izin verdi\u011finden emin olun.<\/p>\n<\/li>\n<li data-start=\"1981\" data-end=\"2061\">\n<p data-start=\"1983\" data-end=\"2061\">Port numaras\u0131n\u0131 1024&#8217;\u00fcn \u00fczerinde se\u00e7meniz, sistem portlar\u0131yla \u00e7ak\u0131\u015fmay\u0131 \u00f6nler.<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>SSH i\u00e7in yeni portu test etmeden eskiyi kapatmay\u0131n. G\u00fcvenlik duvar\u0131 ve a\u011f ayarlar\u0131n\u0131n yeni porta izin verdi\u011finden emin olun. 1024 \u00fczerindeki portlar\u0131 se\u00e7mek, sistem portlar\u0131yla \u00e7ak\u0131\u015fmay\u0131 \u00f6nleyerek daha g\u00fcvenli bir yap\u0131 sa\u011flar.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[49],"class_list":["post-611","post","type-post","status-publish","format-standard","hentry","category-vps-server","tag-centos"],"meta_box":[],"_links":{"self":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts\/611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/comments?post=611"}],"version-history":[{"count":4,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts\/611\/revisions"}],"predecessor-version":[{"id":841,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts\/611\/revisions\/841"}],"wp:attachment":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/media?parent=611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/categories?post=611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/tags?post=611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}