{"id":4173,"date":"2019-04-23T00:45:30","date_gmt":"2019-04-22T20:15:30","guid":{"rendered":"https:\/\/rasanegar.com\/blog\/?p=4173"},"modified":"2019-04-23T13:39:52","modified_gmt":"2019-04-23T09:09:52","slug":"customizing-welcome-message-centos-rhel-ubuntu","status":"publish","type":"post","link":"https:\/\/rasanegaar.com\/blog\/customizing-welcome-message-centos-rhel-ubuntu\/","title":{"rendered":"\u0646\u0645\u0627\u06cc\u0634 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0633\u0631\u0648\u0631 \u0644\u06cc\u0646\u0648\u06a9\u0633 \u067e\u0633 \u0627\u0632 \u0648\u0631\u0648\u062f \u0628\u0627 SSH (MOTD)"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\"><p class=\"ez-toc-title\" style=\"cursor:inherit\">\u0633\u0631\u0641\u0635\u0644\u0647\u0627\u06cc \u0645\u0637\u0644\u0628<\/p>\n<\/div><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/rasanegaar.com\/blog\/customizing-welcome-message-centos-rhel-ubuntu\/#%d8%a7%d8%b3%da%a9%d8%b1%db%8c%d9%be%d8%aa_%d9%86%d9%85%d8%a7%db%8c%d8%b4_%d8%a7%d8%b7%d9%84%d8%a7%d8%b9%d8%a7%d8%aa_%d8%b3%d8%b1%d9%88%d8%b1_%d9%be%d8%b3_%d8%a7%d8%b2_%d8%b3%d8%b1%d9%88%d8%b1_%d8%a8%d9%87_%d8%b9%d9%86%d9%88%d8%a7%d9%86_mod\" >\u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0646\u0645\u0627\u06cc\u0634 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0633\u0631\u0648\u0631 \u067e\u0633 \u0627\u0632 \u0633\u0631\u0648\u0631 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 MOD<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/rasanegaar.com\/blog\/customizing-welcome-message-centos-rhel-ubuntu\/#%d8%a7%d8%b3%da%a9%d8%b1%db%8c%d9%be%d8%aa_%d9%be%db%8c%d8%b4%d8%b1%d9%81%d8%aa%d9%87_%d8%aa%d8%b1_%d9%86%d9%85%d8%a7%db%8c%d8%b4_%d8%a7%d8%b7%d9%84%d8%a7%d8%b9%d8%a7%d8%aa_%d8%af%d8%b1_mod\" >\u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u067e\u06cc\u0634\u0631\u0641\u062a\u0647 \u062a\u0631 \u0646\u0645\u0627\u06cc\u0634 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u062f\u0631 MOD<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/rasanegaar.com\/blog\/customizing-welcome-message-centos-rhel-ubuntu\/#%d8%b3%d8%aa_%da%a9%d8%b1%d8%af%d9%86_mod_%d8%b1%d9%88%db%8c_ubuntu\" >\u0633\u062a \u06a9\u0631\u062f\u0646 MOD \u0631\u0648\u06cc Ubuntu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/rasanegaar.com\/blog\/customizing-welcome-message-centos-rhel-ubuntu\/#%d8%b3%d8%aa_%da%a9%d8%b1%d8%af%d9%86_mod_%d8%b1%d9%88%db%8c_centos\" >\u0633\u062a \u06a9\u0631\u062f\u0646 MOD \u0631\u0648\u06cc CentOS<\/a><\/li><\/ul><\/nav><\/div>\n<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">\u0632\u0645\u0627\u0646 \u0644\u0627\u0632\u0645 \u0628\u0631\u0627\u06cc \u0645\u0637\u0627\u0644\u0639\u0647: <\/span> <span class=\"rt-time\"> 3<\/span> <span class=\"rt-label rt-postfix\">\u062f\u0642\u06cc\u0642\u0647<\/span><\/span><article class=\"bg-white\">\n<div class=\"container mx-auto\">\n<div class=\"px-4 contentable max-w-lg mx-auto pb-10 pt-4\">\n<p>\u0627\u06af\u0631 \u0628\u062e\u0648\u0627\u0647\u06cc\u062f \u0647\u0631 \u0632\u0645\u0627\u0646 \u0628\u0627 SSH \u0648\u0627\u0631\u062f \u0633\u0631\u0648\u0631\u0645\u062c\u0627\u0632\u06cc \u06cc\u0627 \u0627\u062e\u062a\u0635\u0627\u0635\u06cc \u0644\u06cc\u0646\u0648\u06a9\u0633 ( \u0633\u0646\u062a \u0627\u0648 \u0627\u0633 \u06cc\u0627 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 )\u00a0 \u0645\u06cc \u0634\u0648\u06cc\u062f \u0633\u06cc\u0633\u062a\u0645 \u0628\u0647 \u0634\u0645\u0627 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0633\u0631\u0648\u0631\u06cc \u06a9\u0647 \u0628\u0647 \u0622\u0646 \u0644\u0627\u06af\u06cc\u0646 \u06a9\u0631\u062f\u06cc\u062f \u0631\u0627 \u0646\u0645\u0627\u06cc\u0634 \u062f\u0647\u062f \u0637\u0628\u0642 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u067e\u06cc\u0634 \u0628\u0631\u0648\u06cc\u062f \u060c \u0628\u0647 \u0627\u06cc\u0646 \u0633\u06cc\u0633\u062a\u0645 Message of the Day \u06af\u0641\u062a\u0647 \u0645\u06cc \u0634\u0648\u062f<\/p>\n<p>\u0627\u0637\u0644\u0627\u0639\u0627\u062a\u06cc \u06a9\u0647 \u062f\u0631 \u0627\u06cc\u0646 \u0628\u062e\u0634 \u0646\u0645\u0627\u06cc\u0634 \u062f\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f \u0631\u0627 \u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u0645\u0637\u0627\u0628\u0642 \u0646\u06cc\u0627\u0632 \u062e\u0648\u062f \u0648 \u0646\u0648\u0639 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0633\u0631\u0648\u0631 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f \u060c \u0645\u0627 \u0645\u0639\u0645\u0648\u0644\u0627 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0633\u0631\u0648\u0631 \u0645\u0634\u062a\u0631\u06cc \u0631\u0627 \u062f\u0631 \u0627\u06cc\u0646 \u0642\u0633\u0645\u062a \u0642\u0631\u0627\u0631 \u0645\u06cc\u062f\u0647\u06cc\u0645 \u060c<\/p>\n<p>\u0627\u06af\u0631 \u0686\u0647 \u0634\u0645\u0627 \u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u06a9\u062f \u0632\u06cc\u0631 \u0628\u0631\u0627\u06cc \u062f\u0631\u06cc\u0627\u0641\u062a \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u06a9\u0644\u06cc \u0627\u0632 \u0633\u0631\u0648\u0631\u06cc \u06a9\u0647 \u0628\u0647 \u0622\u0646 \u0648\u0627\u0631\u062f \u0634\u062f\u0647 \u0627\u06cc\u062f \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0646\u06cc\u062f<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%d8%a7%d8%b3%da%a9%d8%b1%db%8c%d9%be%d8%aa_%d9%86%d9%85%d8%a7%db%8c%d8%b4_%d8%a7%d8%b7%d9%84%d8%a7%d8%b9%d8%a7%d8%aa_%d8%b3%d8%b1%d9%88%d8%b1_%d9%be%d8%b3_%d8%a7%d8%b2_%d8%b3%d8%b1%d9%88%d8%b1_%d8%a8%d9%87_%d8%b9%d9%86%d9%88%d8%a7%d9%86_mod\"><\/span>\u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0646\u0645\u0627\u06cc\u0634 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0633\u0631\u0648\u0631 \u067e\u0633 \u0627\u0632 \u0633\u0631\u0648\u0631 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 MOD<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u0627\u06cc\u0646 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0631\u0627 \u0645\u0646 \u0628\u0627 \u0646\u0627\u0645 on_login.sh \u0627\u06cc\u062d\u0627\u062f \u06a9\u0631\u062f\u0645 \u060c \u0628\u0639\u062f \u0627\u0632 \u0627\u06cc\u062c\u0627\u062f \u0641\u0627\u06cc\u0644 \u0645\u062d\u062a\u0648\u0627\u06cc \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0631 \u0622\u0646 \u06a9\u067e\u06cc \u06a9\u0646\u06cc\u062f \u0648 \u062f\u0631 \u0645\u0631\u0627\u062d\u0644 \u0628\u0639\u062f \u062e\u0648\u0627\u0647\u06cc\u0645 \u06af\u0641\u062a \u0628\u0631\u0627\u06cc \u0647\u0631 \u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644 \u0686\u06af\u0648\u0646\u0647 \u0627\u0632 \u0627\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f<\/p>\n<pre><code class=\"language-bash\">#! \/usr\/bin\/env bash\r\n# Basic info\r\nHOSTNAME=`uname -n`\r\nROOT=`df -Ph | grep xvda1 | awk '{print $4}' | tr -d '\\n'`\r\n\r\n# System load\r\nMEMORY1=`free -t -m | grep Total | awk '{print $3\" MB\";}'`\r\nMEMORY2=`free -t -m | grep \"Mem\" | awk '{print $2\" MB\";}'`\r\nLOAD1=`cat \/proc\/loadavg | awk {'print $1'}`\r\nLOAD5=`cat \/proc\/loadavg | awk {'print $2'}`\r\nLOAD15=`cat \/proc\/loadavg | awk {'print $3'}`\r\n\r\necho \"\r\n===============================================\r\n - Hostname............: $HOSTNAME\r\n - Disk Space..........: $ROOT remaining\r\n===============================================\r\n - CPU usage...........: $LOAD1, $LOAD5, $LOAD15 (1, 5, 15 min)\r\n - Memory used.........: $MEMORY1 \/ $MEMORY2\r\n - Swap in use.........: `free -m | tail -n 1 | awk '{print $3}'` MB\r\n===============================================\r\n\"<\/code><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"%d8%a7%d8%b3%da%a9%d8%b1%db%8c%d9%be%d8%aa_%d9%be%db%8c%d8%b4%d8%b1%d9%81%d8%aa%d9%87_%d8%aa%d8%b1_%d9%86%d9%85%d8%a7%db%8c%d8%b4_%d8%a7%d8%b7%d9%84%d8%a7%d8%b9%d8%a7%d8%aa_%d8%af%d8%b1_mod\"><\/span>\u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u067e\u06cc\u0634\u0631\u0641\u062a\u0647 \u062a\u0631 \u0646\u0645\u0627\u06cc\u0634 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u062f\u0631 MOD<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sh\" data-enlighter-title=\"\">#!\/bin\/bash\r\n \r\n#\r\n# Installation:\r\n#\r\n# 1. vi \/etc\/profile\r\n# \/usr\/local\/bin\/dynamic_motd # Place at the bottom\r\n#\r\n# 2. copy this script into\r\n# \/usr\/local\/bin\/dynamic_motd\r\n#\r\n# 3. chmod +x \/usr\/local\/bin\/dynamic_motd\r\n#\r\n# THANKS TO:\r\n# https:\/\/gist.github.com\/cha55son\/6042560\r\n# https:\/\/silvinux.wordpress.com\/2015\/01\/04\/dynamic-motd-centosredhat\/\r\n#\r\n \r\nUSER=`whoami`\r\nHOSTNAME=`uname -n`\r\nIP=`hostname -I`\r\n \r\n# disk usage on \/\r\nROOT=`df -Ph \/ | awk &#039;\/\\\/\/ {print &quot;used:&quot;,$3,&quot;\/&quot;,$2,&quot; ( free:&quot;,$4,&quot;)&quot;}&#039;`\r\nROOT_USAGE=`df -h \/ | awk &#039;\/\\\/\/ {print $5}&#039;|grep -v &quot;^$&quot;`\r\n \r\n# get memory details and percentage used\r\nMEMORY=`free -mh | grep &quot;Mem&quot; | awk &#039;{print &quot;used:&quot;,$4,&quot;\/&quot;,$2,&quot;( free: &quot;,$3,&quot;)&quot;}&#039;`\r\nMEM_USAGE=`free -m | grep &quot;Mem&quot; | awk &#039;{printf(&quot;%3.1f%%&quot;, (($3\/$2)*100))}&#039;`\r\n \r\n# get swap file details\r\nSWAP=`free -mh | grep &quot;Swap&quot; | awk &#039;{print &quot;used:&quot;,$4,&quot;\/&quot;,$2,&quot;( free: &quot;,$3,&quot;)&quot;}&#039;`\r\n \r\n# get processes\r\nPSA=`ps -Afl | wc -l`\r\n \r\n# time of day\r\nHOUR=$(date +&quot;%H&quot;)\r\nif [ $HOUR -lt 12 -a $HOUR -ge 0 ]\r\nthen TIME=&quot;morning&quot;\r\nelif [ $HOUR -lt 17 -a $HOUR -ge 12 ]\r\nthen TIME=&quot;afternoon&quot;\r\nelse\r\nTIME=&quot;evening&quot;\r\nfi\r\n \r\n# system uptime\r\nuptime=`cat \/proc\/uptime | cut -f1 -d.`\r\nupDays=$((uptime\/60\/60\/24))\r\nupHours=$((uptime\/60\/60%24))\r\nupMins=$((uptime\/60%60))\r\nupSecs=$((uptime%60))\r\n \r\n# system load (1\/5\/15 minutes)\r\nLOAD1=`cat \/proc\/loadavg | awk {&#039;print $1&#039;}`\r\nLOAD5=`cat \/proc\/loadavg | awk {&#039;print $2&#039;}`\r\nLOAD15=`cat \/proc\/loadavg | awk {&#039;print $3&#039;}`\r\n \r\nCOLOR_COLUMN=&quot;\\e[1m-&quot;\r\nCOL_WHITE=&quot;\\e[39m&quot;\r\nCOL_RED=&quot;\\e[31m&quot;\r\nCOL_GREEN=&quot;\\e[32m&quot;\r\nCOL_YELLOW=&quot;\\e[33m&quot;\r\nRESET_COLORS=&quot;\\e[0m&quot;\r\n \r\necho -e &quot;\r\n=============================== SYSTEM ====================================\r\n$COLOR_COLUMN- Current usr$RESET_COLORS \\t: $COL_WHITE $USER $RESET_COLORS\r\n$COLOR_COLUMN- Hostname$RESET_COLORS \\t\\t: $COL_YELLOW $HOSTNAME $RESET_COLORS\r\n$COLOR_COLUMN- IP Address$RESET_COLORS \\t\\t: $COL_YELLOW $IP $RESET_COLORS\r\n \r\n$COLOR_COLUMN- Release$RESET_COLORS \\t\\t: $COL_GREEN `cat \/etc\/redhat-release` $RESET_COLORS\r\n$COLOR_COLUMN- System uptime$RESET_COLORS \\t: $COL_WHITE $upDays days, $upHours hours, $upMins minutes, $upSecs seconds $RESET_COLORS\r\n$COLOR_COLUMN- Users$RESET_COLORS \\t\\t: $COL_WHITE Currently `users | wc -w` user(s) logged on $RESET_COLORS\r\n \r\n============================== SYSINFO ==================================$RESET_COLORS\r\n$COLOR_COLUMN- CPU usage$RESET_COLORS \\t\\t: $COL_WHITE $LOAD1 - $LOAD5 - $LOAD15 (1-5-15 min) $RESET_COLORS\r\n$COLOR_COLUMN- Memory usage$RESET_COLORS \\t: $COL_WHITE $MEM_USAGE $RESET_COLORS\r\n$COLOR_COLUMN- Memory$RESET_COLORS \\t\\t: $COL_WHITE $MEMORY $RESET_COLORS\r\n$COLOR_COLUMN- Swap in use$RESET_COLORS \\t: $COL_WHITE $SWAP $RESET_COLORS\r\n$COLOR_COLUMN- Processes$RESET_COLORS \\t\\t: $COL_WHITE $PSA running $RESET_COLORS\r\n$COLOR_COLUMN- Disk space \/$RESET_COLORS \\t: $COL_WHITE $ROOT $RESET_COLORS\r\n$COLOR_COLUMN- Disk usage \/$RESET_COLORS \\t: $COL_WHITE $ROOT_USAGE $RESET_COLORS\r\n===========================================================================\r\n&quot;<\/pre>\n<div id=\"crayon-5cbe2205e5bfd815842339-85\" class=\"crayon-line\">\u00a0<\/div>\n<h2><span class=\"ez-toc-section\" id=\"%d8%b3%d8%aa_%da%a9%d8%b1%d8%af%d9%86_mod_%d8%b1%d9%88%db%8c_ubuntu\"><\/span>\u0633\u062a \u06a9\u0631\u062f\u0646 MOD \u0631\u0648\u06cc Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u062f\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 \u0627\u06cc\u062c\u0627\u062f \u0627\u06cc\u0646 \u067e\u06cc\u0627\u0645 \u062e\u06cc\u0644\u06cc \u0633\u0627\u062f\u0647 \u0627\u0633\u062a \u060c \u06a9\u0627\u0641\u06cc \u0627\u0633\u062a \u0641\u0627\u06cc\u0644 \u062d\u0627\u0648\u06cc \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0641\u0648\u0642 \u0631\u0627 \u062f\u0631 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc <code>\/etc\/update-motd.d<\/code> \u0642\u0631\u0627\u0631 \u0628\u062f\u0647\u06cc\u062f<\/p>\n<pre><code class=\"language-bash\">sudo mv on_login.sh \/etc\/update-motd.d\/05-info\r\nsudo chmod +x \/etc\/update-motd.d\/05-info<\/code><\/pre>\n<p>\u0628\u0644\u0627\u0641\u0627\u0635\u0644\u0647 \u067e\u0633 \u0627\u0632 \u062e\u0631\u0648\u062c \u0627\u0632 \u0633\u0631\u0648\u0631 \u0648 \u0644\u0627\u06af\u06cc\u0646 \u0645\u062c\u062f\u062f \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0631\u0627 \u0645\u0634\u0627\u0647\u062f\u0647 \u062e\u0648\u0627\u0647\u06cc\u062f \u06a9\u0631\u062f<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%d8%b3%d8%aa_%da%a9%d8%b1%d8%af%d9%86_mod_%d8%b1%d9%88%db%8c_centos\"><\/span>\u0633\u062a \u06a9\u0631\u062f\u0646 MOD \u0631\u0648\u06cc CentOS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u0633\u062a \u06a9\u0631\u062f\u0646 \u067e\u06cc\u0627\u0645 \u0631\u0648\u0632 \u0631\u0648\u06cc \u0633\u0646\u062a \u0627\u0648 \u0627\u0633 \u0628\u0647 \u062a\u0646\u0638\u06cc\u0645\u0627\u062a \u0628\u06cc\u0634\u062a\u0631\u06cc \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u062f<\/p>\n<p>\u0627\u0628\u062a\u062f\u0627 \u0628\u0627\u06cc\u062f PrintMotd \u0631\u0627 \u062f\u0631 \u0641\u0627\u06cc\u0644 <code>\/etc\/ssh\/sshd_config<\/code> \u0628\u0647 no \u062a\u063a\u06cc\u06cc\u0631 \u0628\u062f\u0647\u06cc\u062f \u060c \u062a\u0648\u062c\u0647 \u06a9\u0646\u06cc\u062f \u0628\u0627\u06cc\u062f \u0627\u0628\u062a\u062f\u0627 \u0622\u0646 \u0631\u0627 \u0627\u0632 \u06a9\u0627\u0646\u062a \u062e\u0627\u0631\u062d \u0648 \u0633\u067e\u0633 yes \u0631\u0627 \u0628\u0647 no \u062a\u063a\u06cc\u06cc\u0631 \u0628\u062f\u0647\u06cc\u062f<\/p>\n<pre><code>PrintMotd no<\/code><\/pre>\n<p>\u062f\u0633\u062a\u0648\u0631 \u0641\u0648\u0642 \u0628\u0647 \u0627\u0632\u0627\u06cc \u0647\u0631 \u0648\u0631\u0648\u062f \u0641\u0627\u06cc\u0644 \/etc\/motd \u0631\u0627 \u06a9\u0647 \u06cc\u06a9 \u0645\u062a\u0646 \u0633\u0627\u062f\u0647 \u0627\u0633\u062a \u0631\u0627 \u0646\u0645\u0627\u06cc\u0634 \u0645\u06cc\u062f\u0647\u062f ( \u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u0645\u062d\u062a\u0648\u0627\u06cc \u0645\u062a\u0646\u06cc \u0633\u0627\u062f\u0647 \u062e\u0648\u062f \u0631\u0627 \u062f\u0631 \u0622\u0646 \u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u062f )<\/p>\n<p>\u0628\u0639\u062f \u0627\u0632 \u0627\u06cc\u0646 \u062a\u063a\u06cc\u06cc \u0633\u0631\u0648\u06cc\u0633 SSH \u0631\u0627 \u0631\u06cc\u0633\u062a \u06a9\u0646\u06cc\u062f<\/p>\n<pre><code class=\"language-bash\">sudo service sshd restart<\/code><\/pre>\n<p>\u062d\u0627\u0644\u0627 \u06a9\u0627\u0641\u06cc \u0627\u0633\u062a \u0641\u0627\u06cc\u0644 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u06cc\u062c\u0627\u062f \u0634\u062f\u0647 \u0641\u0648\u0642 \u0631\u0627 \u062f\u0631 <code>\/etc\/profile.d<\/code> \u06a9\u067e\u06cc \u06a9\u0646\u06cc\u062f<\/p>\n<pre><code class=\"language-bash\">sudo mv on_login.sh \/etc\/profile.d\/login-info.sh<\/code><\/pre>\n<p>\u0628\u0639\u062f \u0627\u0632 \u062e\u0631\u0648\u062c \u0627\u0632 \u0633\u0631\u0648\u0631 \u0648 \u0648\u0631\u0648\u062f \u0645\u062c\u062f\u062f \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0633\u0631\u0648\u0631 \u062e\u0648\u062f \u0631\u0627 \u062e\u0648\u0627\u0647\u06cc\u062f \u062f\u06cc\u062f<\/p>\n<\/div>\n<p>\u0645\u0646\u0627\u0628\u0639 : <a href=\"https:\/\/silvinux.wordpress.com\/2015\/01\/04\/dynamic-motd-centosredhat\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\u0645\u0646\u0628\u0639 1\u00a0 <\/a>&#8211; <a href=\"https:\/\/gist.github.com\/cha55son\/6042560\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\u0645\u0646\u0628\u0639 2<\/a><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<\/article>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-center kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;center&quot;,&quot;id&quot;:&quot;4173&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0627\u0645\u062a\u06cc\u0627\u0632 \u0634\u0645\u0627 \u0628\u0647 \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628&quot;,&quot;legend&quot;:&quot;0\\\/5 (0 \u0631\u0627\u06cc)&quot;,&quot;size&quot;:&quot;30&quot;,&quot;title&quot;:&quot;\u0646\u0645\u0627\u06cc\u0634 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0633\u0631\u0648\u0631 \u0644\u06cc\u0646\u0648\u06a9\u0633 \u067e\u0633 \u0627\u0632 \u0648\u0631\u0648\u062f \u0628\u0627 SSH (MOTD)&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} ({count} \u0631\u0627\u06cc)&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 30px; height: 30px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 30px; height: 30px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 30px; height: 30px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 30px; height: 30px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 30px; height: 30px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 30px; height: 30px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 30px; height: 30px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 30px; height: 30px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 30px; height: 30px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 30px; height: 30px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 24px;\">\n            <span class=\"kksr-muted\">\u0627\u0645\u062a\u06cc\u0627\u0632 \u0634\u0645\u0627 \u0628\u0647 \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628<\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">\u0632\u0645\u0627\u0646 \u0644\u0627\u0632\u0645 \u0628\u0631\u0627\u06cc \u0645\u0637\u0627\u0644\u0639\u0647: <\/span> <span class=\"rt-time\"> 3<\/span> <span class=\"rt-label rt-postfix\">\u062f\u0642\u06cc\u0642\u0647<\/span><\/span>\u0627\u06af\u0631 \u0628\u062e\u0648\u0627\u0647\u06cc\u062f \u0647\u0631 \u0632\u0645\u0627\u0646 \u0628\u0627 SSH \u0648\u0627\u0631\u062f \u0633\u0631\u0648\u0631\u0645\u062c\u0627\u0632\u06cc \u06cc\u0627 \u0627\u062e\u062a\u0635\u0627\u0635\u06cc \u0644\u06cc\u0646\u0648\u06a9\u0633 ( \u0633\u0646\u062a \u0627\u0648 \u0627\u0633 \u06cc\u0627 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 )\u00a0 \u0645\u06cc \u0634\u0648\u06cc\u062f \u0633\u06cc\u0633\u062a\u0645 \u0628\u0647 \u0634\u0645\u0627 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0633\u0631\u0648\u0631\u06cc \u06a9\u0647 \u0628\u0647 \u0622\u0646 \u0644\u0627\u06af\u06cc\u0646 \u06a9\u0631\u062f\u06cc\u062f \u0631\u0627 \u0646\u0645\u0627\u06cc\u0634 \u062f\u0647\u062f \u0637\u0628\u0642 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u067e\u06cc\u0634 \u0628\u0631\u0648\u06cc\u062f \u060c \u0628\u0647 \u0627\u06cc\u0646 \u0633\u06cc\u0633\u062a\u0645 Message of the Day \u06af\u0641\u062a\u0647 \u0645\u06cc \u0634\u0648\u062f<\/p>\n","protected":false},"author":3,"featured_media":4178,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[202,95],"tags":[423,1057,1056,422,993,1054,1053,1055],"class_list":["post-4173","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-os","category-linux","tag-centos","tag-motd","tag-ssh-banner","tag-ubuntu","tag--centos","tag--ubuntu","tag-1053","tag--ssh"],"acf":[],"_links":{"self":[{"href":"https:\/\/rasanegaar.com\/blog\/wp-json\/wp\/v2\/posts\/4173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rasanegaar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rasanegaar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rasanegaar.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/rasanegaar.com\/blog\/wp-json\/wp\/v2\/comments?post=4173"}],"version-history":[{"count":0,"href":"https:\/\/rasanegaar.com\/blog\/wp-json\/wp\/v2\/posts\/4173\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rasanegaar.com\/blog\/wp-json\/wp\/v2\/media\/4178"}],"wp:attachment":[{"href":"https:\/\/rasanegaar.com\/blog\/wp-json\/wp\/v2\/media?parent=4173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rasanegaar.com\/blog\/wp-json\/wp\/v2\/categories?post=4173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rasanegaar.com\/blog\/wp-json\/wp\/v2\/tags?post=4173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}