{"id":1083,"date":"2017-12-02T14:07:04","date_gmt":"2017-12-02T15:07:04","guid":{"rendered":"http:\/\/parsvds.com\/wiki\/?p=1083"},"modified":"2017-12-02T14:07:04","modified_gmt":"2017-12-02T15:07:04","slug":"enable-ssh-login-notification-on-linux","status":"publish","type":"post","link":"https:\/\/parsvds.com\/wikitest\/2017\/12\/02\/enable-ssh-login-notification-on-linux\/","title":{"rendered":"\u0622\u0645\u0648\u0632\u0634 \u0645\u0637\u0644\u0639 \u0634\u062f\u0646 \u0627\u0632 \u06cc\u0648\u0632\u0631 \u0647\u0627\u06cc \u0648\u0627\u0631\u062f \u0634\u062f\u0647 \u0628\u0647 ssh"},"content":{"rendered":"<p>\u0633\u0631\u0648\u0631 \u0644\u06cc\u0646\u0648\u06a9\u0633 \u0634\u0645\u0627 \u062a\u0648\u0633\u0637 \u0686\u0646\u062f\u06cc\u0646 \u06a9\u0627\u0631\u0628\u0631 \u0642\u0627\u0628\u0644 \u062f\u0633\u062a\u0631\u0633\u06cc \u0627\u0633\u062a\u061f \u062f\u0631 \u0635\u0648\u0631\u062a\u06cc \u06a9\u0647 \u0686\u0646\u06cc\u0646 \u0628\u0627\u0634\u062f\u060c \u0647\u0631 \u0632\u0645\u0627\u0646 \u06a9\u0647 \u06a9\u0633\u06cc \u0648\u0627\u0631\u062f \u0633\u06cc\u0633\u062a\u0645 \u0634\u0648\u06cc\u062f\u060c \u06cc\u06a9 \u0627\u0639\u0644\u0627\u0646 \u0648\u0631\u0648\u062f \u0628\u0647 \u0633\u06cc\u0633\u062a\u0645 SSH \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>&nbsp;<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\" wp-image-1263 aligncenter\" src=\"http:\/\/parsvds.com\/wiki\/wp-content\/uploads\/2017\/12\/uber_ssh_key-300x176.png\" alt=\"\" width=\"438\" height=\"258\" \/><\/p>\n<h3><span style=\"color: #ff0000;\">CentOS<\/span><\/h3>\n<p>\u0641\u0627\u06cc\u0644 ~ \/ .bash_profile \u0631\u0627 \u062f\u0631\u00a0 \u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631 \u0645\u062a\u0646 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u062e\u0637\u0648\u0637 \u0632\u06cc\u0631 \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre><code>IP=\"$(echo $SSH_CONNECTION | cut -d \" \" -f 1)\"\nHOSTNAME=$(hostname)\nNOW=$(date +\"%e %b %Y, %a %r\")\n\necho 'Someone from '$IP' logged into '$HOSTNAME' on '$NOW'.' | mail -s 'SSH Login Notification' YOUR_EMAIL_ADDRESS\n<\/code><\/pre>\n<h3><span style=\"color: #ff0000;\">Ubuntu\/Debian<\/span><\/h3>\n<p>\u0641\u0627\u06cc\u0644 ~ \/ .bashrc \u0631\u0627 \u062f\u0631 \u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631 \u0645\u062a\u0646 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u062e\u0637\u0648\u0637 \u0632\u06cc\u0631 \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"\"><code>IP=\"$(echo $SSH_CONNECTION | cut -d \" \" -f 1)\"\nHOSTNAME=$(hostname)\nNOW=$(date +\"%e %b %Y, %a %r\")\n\necho 'Someone from '$IP' logged into '$HOSTNAME' on '$NOW'.' | mail -s 'SSH Login Notification' YOUR_EMAIL_ADDRESS<\/code><\/pre>\n<h4><\/h4>\n<p>&nbsp;<\/p>\n<h3 style=\"text-align: center;\"><span style=\"color: #ff0000;\"><strong>\u0645\u0637\u0627\u0644\u0628 \u0645\u0631\u062a\u0628\u0637<\/strong><\/span><\/h3>\n<h3 style=\"text-align: center;\"><span style=\"color: #ff0000;\"><strong><img decoding=\"async\" class=\"alignnone size-full wp-image-2684\" src=\"https:\/\/parsvds.com\/wiki\/wp-content\/uploads\/2019\/01\/search-1.png\" alt=\"\" width=\"128\" height=\"128\" \/><\/strong><\/span><\/h3>\n<p>[tie_slideshow]<\/p>\n<p>[tie_slide]<\/p>\n<style> .rotate{background-image: url(\"https:\/\/parsvds.com\/wiki\/wp-content\/uploads\/2019\/12\/bg-5-min.jpg\");height:200px;padding: 10px;animation-name: example;animation-duration: 2s;}  @-webkit-keyframes example { from { transform: translateY(50px) translateZ(0px) rotateX(90deg);opacity: 0;} to { transform: translateY(0px) translateZ(0px) rotateX(0deg);opacity: 1;} }  @keyframes example { from { transform: translateY(0px) translateZ(0px) rotateX(90deg);opacity: 0;} to { transform: translateY(0px) translateZ(0px) rotateX(0deg);opacity: 1;} }<\/style>\n<div class=\"r\">\n<div class=\"row\">\n<div class=\"col-sm-6 col-12\">\n<p style=\"padding:20px 0; color:#fff;text-align:center\">\u0627\u0645\u0646\u06cc\u062a \u060c \u0633\u0631\u0639\u062a \u060c \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc<br \/>\n\u0647\u0645\u0647 \u06cc\u06a9\u062c\u0627 \u062f\u0631 \u0633\u0631\u0648\u06cc\u0633 \u0647\u0627\u06cc \u067e\u0627\u0631\u0633 \u0648\u06cc \u062f\u06cc \u0627\u0633<br \/>\n\u0628\u0647\u062a\u0631\u06cc\u0646 \u0631\u0627 \u0627\u0632 \u0645\u0627 \u0628\u062e\u0648\u0627\u0647\u06cc\u062f<br \/>\n<br \/>\n<a href=\"https:\/\/parsvds.com\/\" class=\"btn btn-success\" style=\"color:#fff;\">\u0645\u0634\u0627\u0647\u062f\u0647 \u0633\u0631\u0648\u06cc\u0633 \u0647\u0627<\/a>\n<\/p>\n<\/div>\n<div class=\"col-sm-6 col-12\">\n<img decoding=\"async\"  src=\"https:\/\/parsvds.com\/wiki\/wp-content\/uploads\/2020\/01\/features1.png\" alt=\"\" style=\"height:180px;\" \/>\n<\/div>\n<\/div>\n<\/div>\n<p><script>\nvar doing = false;\njQuery(window).scroll(function() {\n    if (jQuery(this).scrollTop()>1200)\n    {\nif( !doing){\n        doing = true;\n            jQuery('.r').addClass('rotate');\n        }\n    }\n});\n<\/script>&nbsp;&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/parsvds.com\/wiki\/virtual-server-vnc\/\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"wp-image-2712 size-thumbnail alignright\" src=\"https:\/\/parsvds.com\/wiki\/wp-content\/uploads\/2019\/04\/internet_broken_connection_network_web_connect_global_offline_worldwide_net_disconnected-512-150x150.png\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<h3 class=\"post-title\"><a title=\"\u0622\u0645\u0648\u0632\u0634 \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 \u0633\u0631\u0648\u0631 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u06a9\u0646\u0633\u0648\u0644\" href=\"https:\/\/parsvds.com\/wiki\/virtual-server-vnc\/\" target=\"_blank\" rel=\"noopener\">\u0622\u0645\u0648\u0632\u0634 \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 \u0633\u0631\u0648\u0631 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u06a9\u0646\u0633\u0648\u0644<\/a><\/h3>\n<p>\u0628\u0631\u062e\u06cc \u0645\u0648\u0627\u0642\u0639 \u0627\u0645\u06a9\u0627\u0646 \u062f\u0627\u0631\u062f \u0628\u0627 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a\u06cc \u06a9\u0647 \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0645\u062c\u0627\u0632\u06cc \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc\u062f\u0647\u06cc\u062f \u062f\u0633\u062a\u0631\u0633\u06cc \u0634\u0645\u0627 \u0628\u0627 \u0633\u0631\u0648\u0631 \u0642\u0637\u0639 \u0634\u0648\u062f<\/p>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0628\u0647 \u0634\u0645\u0627 \u0631\u0648\u0634 \u062d\u0644 \u0627\u06cc\u0646 \u0645\u0634\u06a9\u0644 \u062a\u0648\u0636\u06cc\u062d \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a[\/tie_slide][tie_slide]<\/p>\n<p><a href=\"https:\/\/parsvds.com\/wiki\/how\/\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2203 size-thumbnail alignright\" src=\"https:\/\/parsvds.com\/wiki\/wp-content\/uploads\/2018\/11\/admin-ajax-150x150.png\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<h3 class=\"post-title\"><a title=\"\u0622\u0645\u0648\u0632\u0634 \u0647\u0627\u06cc \u062a\u0635\u0648\u06cc\u0631\u06cc \u067e\u0646\u0644 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0633\u0631\u0648\u0631 \u0647\u0627\u06cc \u0645\u062c\u0627\u0632\u06cc \u067e\u0627\u0631\u0633 \u0648\u06cc \u062f\u06cc \u0627\u0633\" href=\"https:\/\/parsvds.com\/wiki\/how\/\" target=\"_blank\" rel=\"noopener\">\u0622\u0645\u0648\u0632\u0634 \u0647\u0627\u06cc \u062a\u0635\u0648\u06cc\u0631\u06cc \u067e\u0646\u0644 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0633\u0631\u0648\u0631 \u0647\u0627\u06cc \u0645\u062c\u0627\u0632\u06cc \u067e\u0627\u0631\u0633 \u0648\u06cc \u062f\u06cc \u0627\u0633<\/a><\/h3>\n<p><strong>\u00a0<\/strong><\/p>\n<p>\u0645\u062c\u0645\u0648\u0639\u0647 \u0627\u06cc \u0627\u0632 \u0622\u0645\u0648\u0632\u0634 \u0647\u0627\u06cc \u0645\u062f\u06cc\u0631\u06cc\u062a \u0648 \u06a9\u0646\u062a\u0631\u0644 \u0633\u0631\u0648\u0631 \u0645\u062c\u0627\u0632\u06cc [\/tie_slide][tie_slide]<\/p>\n<p><a href=\"https:\/\/parsvds.com\/wiki\/chenge-password-windows-server-2012\/\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2515 size-thumbnail alignright\" src=\"https:\/\/parsvds.com\/wiki\/wp-content\/uploads\/2018\/11\/change-password-wordpress-1170x536-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<h3 class=\"post-title\"><a title=\"\u062a\u063a\u06cc\u06cc\u0631 \u067e\u0633\u0648\u0631\u062f \u0648\u06cc\u0646\u062f\u0648\u0632 \u0633\u0631\u0648\u06312012\" href=\"https:\/\/parsvds.com\/wiki\/chenge-password-windows-server-2012\/\" target=\"_blank\" rel=\"noopener\">\u062a\u063a\u06cc\u06cc\u0631 \u067e\u0633\u0648\u0631\u062f \u0648\u06cc\u0646\u062f\u0648\u0632 \u0633\u0631\u0648\u06312012<\/a><\/h3>\n<p><strong>\u00a0<\/strong><\/p>\n<p>\u06cc\u06a9\u06cc \u0627\u0632 \u0646\u06a9\u0627\u062a \u0645\u0647\u0645 \u0627\u0645\u0646\u06cc\u062a\u06cc \u062a\u063a\u06cc\u06cc\u0631 \u067e\u0633\u0648\u0631\u062f \u0633\u0631\u0648\u0631 \u0645\u062c\u0627\u0632\u06cc \u0645\u06cc\u0628\u0627\u0634\u062f\u00a0 [\/tie_slide][tie_slide]<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/parsvds.com\/wiki\/%D8%A2%D9%85%D9%88%D8%B2%D8%B4-%D8%AA%D8%A7%DB%8C%DB%8C%D8%AF-%D8%AF%D9%88-%D9%85%D8%B1%D8%AD%D9%84%D9%87-%D8%A7%DB%8C-%D8%B3%DB%8C-%D9%BE%D9%86%D9%84-parsvds\/\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2676 size-thumbnail alignright\" src=\"https:\/\/parsvds.com\/wiki\/wp-content\/uploads\/2019\/01\/cpanel-2-150x150.png\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<h4 class=\"post-title entry-title\"><a href=\"https:\/\/parsvds.com\/wiki\/%D8%A2%D9%85%D9%88%D8%B2%D8%B4-%D8%AA%D8%A7%DB%8C%DB%8C%D8%AF-%D8%AF%D9%88-%D9%85%D8%B1%D8%AD%D9%84%D9%87-%D8%A7%DB%8C-%D8%B3%DB%8C-%D9%BE%D9%86%D9%84-parsvds\/\" target=\"_blank\" rel=\"noopener\">\u0622\u0645\u0648\u0632\u0634 \u062a\u0627\u06cc\u06cc\u062f \u062f\u0648 \u0645\u0631\u062d\u0644\u0647 \u0627\u06cc \u0633\u06cc \u067e\u0646\u0644 PARSVDS<\/a><\/h4>\n<p><strong>\u00a0<\/strong><\/p>\n<p>\u0628\u0627 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0627\u0645\u0646\u06cc\u062a \u0633\u0627\u06cc\u062a \u062e\u0648\u062f \u0631\u0627 \u062f\u0631 \u0628\u0631\u0627\u0628\u0631 \u0647\u06a9 \u062f\u0648 \u0686\u0646\u062f\u0627\u0646 \u06a9\u0646\u06cc\u062f [\/tie_slide]<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>[\/tie_slideshow]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0633\u0631\u0648\u0631 \u0644\u06cc\u0646\u0648\u06a9\u0633 \u0634\u0645\u0627 \u062a\u0648\u0633\u0637 \u0686\u0646\u062f\u06cc\u0646 \u06a9\u0627\u0631\u0628\u0631 \u0642\u0627\u0628\u0644 \u062f\u0633\u062a\u0631\u0633\u06cc \u0627\u0633\u062a\u061f \u062f\u0631 \u0635\u0648\u0631\u062a\u06cc \u06a9\u0647 \u0686\u0646\u06cc\u0646 \u0628\u0627\u0634\u062f\u060c \u0647\u0631 \u0632\u0645\u0627\u0646 \u06a9\u0647 \u06a9\u0633\u06cc \u0648\u0627\u0631\u062f \u0633\u06cc\u0633\u062a\u0645 \u0634\u0648\u06cc\u062f\u060c \u06cc\u06a9 \u0627\u0639\u0644\u0627\u0646 \u0648\u0631\u0648\u062f \u0628\u0647 \u0633\u06cc\u0633\u062a\u0645 SSH \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f. &nbsp; CentOS \u0641\u0627\u06cc\u0644 ~ \/ .bash_profile \u0631\u0627 \u062f\u0631\u00a0 \u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631 \u0645\u062a\u0646 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f. \u062e\u0637\u0648\u0637 \u0632\u06cc\u0631 \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f: IP=&#8221;$(echo $SSH_CONNECTION | cut -d &#8221; &#8221; -f [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":1263,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[2,21],"tags":[697,1162,1300,1731],"class_list":["post-1083","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-linux-guides","tag----------ssh","tag--------ssh--","tag-1300","tag---------ssh"],"uagb_featured_image_src":{"full":["https:\/\/parsvds.com\/wikitest\/wp-content\/uploads\/2017\/12\/uber_ssh_key-1.png",680,400,false],"thumbnail":["https:\/\/parsvds.com\/wikitest\/wp-content\/uploads\/2017\/12\/uber_ssh_key-1-150x150.png",150,150,true],"medium":["https:\/\/parsvds.com\/wikitest\/wp-content\/uploads\/2017\/12\/uber_ssh_key-1-300x176.png",300,176,true],"medium_large":["https:\/\/parsvds.com\/wikitest\/wp-content\/uploads\/2017\/12\/uber_ssh_key-1.png",680,400,false],"large":["https:\/\/parsvds.com\/wikitest\/wp-content\/uploads\/2017\/12\/uber_ssh_key-1.png",680,400,false],"1536x1536":["https:\/\/parsvds.com\/wikitest\/wp-content\/uploads\/2017\/12\/uber_ssh_key-1.png",680,400,false],"2048x2048":["https:\/\/parsvds.com\/wikitest\/wp-content\/uploads\/2017\/12\/uber_ssh_key-1.png",680,400,false]},"uagb_author_info":{"display_name":"\u0633\u062c\u0627\u062f \u0646\u06a9\u0648\u0631\u0627\u062f","author_link":"https:\/\/parsvds.com\/wikitest\/author\/sajad-nekorad\/"},"uagb_comment_info":0,"uagb_excerpt":"\u0633\u0631\u0648\u0631 \u0644\u06cc\u0646\u0648\u06a9\u0633 \u0634\u0645\u0627 \u062a\u0648\u0633\u0637 \u0686\u0646\u062f\u06cc\u0646 \u06a9\u0627\u0631\u0628\u0631 \u0642\u0627\u0628\u0644 \u062f\u0633\u062a\u0631\u0633\u06cc \u0627\u0633\u062a\u061f \u062f\u0631 \u0635\u0648\u0631\u062a\u06cc \u06a9\u0647 \u0686\u0646\u06cc\u0646 \u0628\u0627\u0634\u062f\u060c \u0647\u0631 \u0632\u0645\u0627\u0646 \u06a9\u0647 \u06a9\u0633\u06cc \u0648\u0627\u0631\u062f \u0633\u06cc\u0633\u062a\u0645 \u0634\u0648\u06cc\u062f\u060c \u06cc\u06a9 \u0627\u0639\u0644\u0627\u0646 \u0648\u0631\u0648\u062f \u0628\u0647 \u0633\u06cc\u0633\u062a\u0645 SSH \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f. &nbsp; CentOS \u0641\u0627\u06cc\u0644 ~ \/ .bash_profile \u0631\u0627 \u062f\u0631\u00a0 \u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631 \u0645\u062a\u0646 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f. \u062e\u0637\u0648\u0637 \u0632\u06cc\u0631 \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f: IP=\"$(echo $SSH_CONNECTION | cut -d \" \" -f&hellip;","_links":{"self":[{"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/posts\/1083","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/comments?post=1083"}],"version-history":[{"count":0,"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/posts\/1083\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/media\/1263"}],"wp:attachment":[{"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/media?parent=1083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/categories?post=1083"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/tags?post=1083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}