{"id":3988,"date":"2020-12-06T15:16:37","date_gmt":"2020-12-06T06:16:37","guid":{"rendered":"\/blog\/?p=3988"},"modified":"2023-09-21T09:26:36","modified_gmt":"2023-09-21T00:26:36","slug":"%ec%9c%88%eb%8f%84%ec%9a%b0%ec%97%90-openssh-%ec%84%9c%eb%b2%84-%ec%84%a4%ec%b9%98","status":"publish","type":"post","link":"https:\/\/hasu0707.duckdns.org\/blog\/?p=3988","title":{"rendered":"\uc708\ub3c4\uc6b0\uc5d0 OpenSSH \uc11c\ubc84 \uc124\uce58"},"content":{"rendered":"\n<span style=\"font-family: monospace; font-size: 12px;\">############################################################<br \/># OpenSSH\ub97c \uc124\uce58\ud558\uae30 \uc804 OpenSSH\ub85c \uc811\uc18d\ud560<br \/># \uc708\ub3c4\uc6b0 \uc0ac\uc6a9\uc790\ub97c \ubbf8\ub9ac \ub9cc\ub4e4\uc5b4 \ub193\ub294\ub2e4.<br \/># (\uba85\ub839 \ud504\ub86c\ud504\ud2b8\uc5d0\uc11c \uc2e4\ud589)<br \/>############################################################<br \/>NET USER fortify \/ADD<br \/>NET USER fortify \/FULLNAME:\"MicroFocus Fortify SCA\/SSC\" \/EXPIRES:NEVER \/COMMENT:\"OpenSSH User\" \/LOGONPASSWORDCHG:NO \/PASSWORDCHG:YES \/PASSWORDREQ:YES \/ACTIVE:YES<br \/>REM NET LOCALGROUP Administrators fortify \/ADD<br \/>WMIC USERACCOUNT WHERE \"NAME='fortify'\" SET PASSWORDEXPIRES=FALSE<br \/>NET USER fortify Pass12!@<br \/><br \/>############################################################<br \/># OpenSSH\ub97c \uc124\uce58\ud558\uae30 \uc804 \uc708\ub3c4\uc6b0 \uc5c5\ub370\uc774\ud2b8\ub97c \ud65c\uc131\ud654 \ud55c\ub2e4.<br \/># (\uba85\ub839 \ud504\ub86c\ud504\ud2b8\uc5d0\uc11c \uc2e4\ud589)<br \/>############################################################<br \/># \uc708\ub3c4\uc6b0 \uc5c5\ub370\uc774\ud2b8 \uc11c\ube44\uc2a4 \uc2dc\uc791<br \/>SC CONFIG \"WUAUSERV\" START= AUTO<br \/>SC START \"WUAUSERV\"<br \/><br \/>############################################################<br \/># OpenSSH\ub97c \uc124\uce58<br \/># (PowerShell \uc5d0\uc11c \uc2e4\ud589)<br \/>############################################################<br \/># \uc708\ub3c4\uc6b0 \ucd94\uac00 \ud328\ud0a4\uc9c0 \uc911 OpenSSH \uad00\ub828 \ud328\ud0a4\uc9c0 \uac80\uc0c9<br \/>Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'<br \/><br \/># OpenSSH Server \uc124\uce58<br \/>Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0<br \/><br \/>############################################################<br \/># OpenSSH \uc124\uc815 \ud3b8\uc9d1<br \/>############################################################<br \/>%ProgramData%\\ssh\\sshd_config \ud30c\uc77c\uc744 \ud3b8\uc9d1\ud558\uc5ec \uc544\ub798\ub97c \ucd94\uac00\ud55c\ub2e4.<br \/>--------------<br \/><br \/>#HostKeyAlgorithms ssh-dss,ssh-rsa<br \/>#KexAlgorithms diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1<br \/><br \/>AllowUsers fortify<br \/><br \/>Match Group Administrators<br \/>&nbsp; &nbsp; &nbsp; &nbsp; AllowAgentForwarding no<br \/>&nbsp; &nbsp; &nbsp; &nbsp; AllowTcpForwarding no<br \/>&nbsp; &nbsp; &nbsp; &nbsp; PermitTunnel no<br \/>&nbsp; &nbsp; &nbsp; &nbsp; AllowTcpForwarding no<br \/>&nbsp; &nbsp; &nbsp; &nbsp; ForceCommand internal-sftp<br \/>&nbsp; &nbsp; &nbsp; &nbsp; PermitTTY no<br \/>&nbsp; &nbsp; &nbsp; &nbsp; X11Forwarding no<br \/>&nbsp; &nbsp; &nbsp; &nbsp; ChrootDirectory D:\\0_tmp<br \/><br \/>Match Group Users<br \/>&nbsp; &nbsp; &nbsp; &nbsp; AllowAgentForwarding no<br \/>&nbsp; &nbsp; &nbsp; &nbsp; AllowTcpForwarding no<br \/>&nbsp; &nbsp; &nbsp; &nbsp; PermitTunnel no<br \/>&nbsp; &nbsp; &nbsp; &nbsp; AllowTcpForwarding no<br \/>&nbsp; &nbsp; &nbsp; &nbsp; ForceCommand internal-sftp<br \/>&nbsp; &nbsp; &nbsp; &nbsp; PermitTTY no<br \/>&nbsp; &nbsp; &nbsp; &nbsp; ChrootDirectory D:\\0_tmp<br \/><br \/>--------------<br \/><br \/>############################################################<br \/># OpenSSH \uc2e4\ud589 \ubc0f<br \/># (PowerShell \uc5d0\uc11c \uc2e4\ud589)<br \/>############################################################<br \/># Start Service<br \/>Start-Service sshd<br \/><br \/># Status<br \/>Get-Service -Name sshd<br \/><br \/># OPTIONAL but recommended:<br \/>Set-Service -Name sshd -StartupType 'Automatic'<br \/><br \/># Confirm the Firewall rule is configured. It should be created automatically by setup.<br \/>Get-NetFirewallRule -Name *ssh*<br \/><br \/># There should be a firewall rule named \"OpenSSH-Server-In-TCP\", which should be enabled<br \/># If the firewall does not exist, create one<br \/>New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22<br \/><br \/>############################################################<br \/># \uc708\ub3c4\uc6b0 \uc5c5\ub370\uc774\ud2b8\ub97c \ube44\ud65c\uc131\ud654 \ud55c\ub2e4. (OPTIONAL)<br \/># (\uba85\ub839 \ud504\ub86c\ud504\ud2b8\uc5d0\uc11c \uc2e4\ud589)<br \/>############################################################<br \/>SC CONFIG \"WUAUSERV\" START= DISABLED<br \/>SC STOP \"WUAUSERV\"<br \/><br \/>############################################################<br \/># OpenSSH \uc81c\uac70<br \/># (PowerShell \uc5d0\uc11c \uc2e4\ud589)<br \/>############################################################<br \/>Remove-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0<br \/>Remove-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0<br \/><br \/>############################################################<br \/># \uc0ac\uc6a9\uc790\uc758 \ud648\ub514\ub809\ud1a0\ub9ac\uac00 \uc544\ub2cc \ub2e4\ub978 \ub514\ub809\ud1a0\ub9ac\ub85c \ub9c8\uc6b4\ud2b8\ud558\uae30 \uc704\ud574<br \/># \uc0ac\uc6a9\uc790 \ud648 \ub514\ub809\ud1a0\ub9ac\uc5d0 \uc2ec\ubcfc\ub9ad \ub9c1\ud06c\ub97c \ub9cc\ub4e0\ub2e4.<br \/># (\uba85\ub839 \ud504\ub86c\ud504\ud2b8\uc5d0\uc11c \uc2e4\ud589)<br \/>############################################################<br \/>MKDIR D:\\sca_data<br \/>RMDIR C:\\Users\\fortify\\DATA_DIR<br \/>MKLINK \/D C:\\Users\\fortify\\DATA_DIR D:\\sca_data<br \/><br \/><br \/><\/span>\n","protected":false},"excerpt":{"rendered":"<p>############################################################# OpenSSH\ub97c \uc124\uce58\ud558\uae30 \uc804 OpenSSH\ub85c \uc811\uc18d\ud560# \uc708\ub3c4\uc6b0 \uc0ac\uc6a9\uc790\ub97c \ubbf8\ub9ac \ub9cc\ub4e4\uc5b4 \ub193\ub294\ub2e4.# (\uba85\ub839 \ud504\ub86c\ud504\ud2b8\uc5d0\uc11c \uc2e4\ud589)############################################################NET USER fortify \/ADDNET USER fortify \/FULLNAME:&#8221;MicroFocus Fortify SCA\/SSC&#8221; \/EXPIRES:NEVER \/COMMENT:&#8221;OpenSSH User&#8221; \/LOGONPASSWORDCHG:NO \/PASSWORDCHG:YES \/PASSWORDREQ:YES \/ACTIVE:YESREM NET LOCALGROUP Administrators fortify \/ADDWMIC USERACCOUNT WHERE &#8220;NAME=&#8217;fortify'&#8221; SET PASSWORDEXPIRES=FALSENET USER fortify Pass12!@ ############################################################# OpenSSH\ub97c \uc124\uce58\ud558\uae30 \uc804 \uc708\ub3c4\uc6b0 \uc5c5\ub370\uc774\ud2b8\ub97c \ud65c\uc131\ud654 \ud55c\ub2e4.# (\uba85\ub839 \ud504\ub86c\ud504\ud2b8\uc5d0\uc11c \uc2e4\ud589)############################################################# \uc708\ub3c4\uc6b0 \uc5c5\ub370\uc774\ud2b8 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[40],"tags":[],"class_list":["post-3988","post","type-post","status-publish","format-standard","hentry","category-os_win"],"_links":{"self":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3988","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3988"}],"version-history":[{"count":0,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3988\/revisions"}],"wp:attachment":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3988"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3988"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3988"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}