Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

작업

Inventory Server (Windows Server)

완료 (Y/N)

필수설치 항목

PowerShell Version 1.0 ~ 5.1

  • Window Server 2008의 경우 Component 활용 Optional 하게 설치하여야 합니다.

 

pscp (SFTP Client) 설치

roro 작업 계정 생성 및 권한 설정

(Local) Administrators 권한 부여 필요

 

Network (Firewall)

WinRM에서 기본으로 쓰는 Port는 5985이다.

  • 방화벽 설정에서 InBound Port 5985를 추가한다.

  • 별도의 OutBound 설정을 관리한다면 RoRo 서버의 SSH 포트로 접속이 가능하도록 설정을 추가한다.

 

WinRM 설정

(Power Shell : 관리자 모드)

Basic 인증 방법 추가 및 설정.

Code Block
# WinRM 서비스 활성화
winrm qc
 
# Basic 인증 방법 추가. (RoRo에서 Basic 인증 방법을 사용한다.)
winrm set winrm/config/service/Auth '@{Basic="true"}'

# AllowUnencrypted 설정 (암호화 되지않는 데이터의 전송을 허용).
winrm set winrm/config/service '@{AllowUnencrypted="true"}'

# Shell의 자식 프로세스를 포함하여 할당된 최대 메모리 양 설정 (기본값 : 1024)
# 기본값 보다 작은 값으로 설정된 경우 제대로 동작하지 않을 수 있음.
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="1024"}'

 

Trust Host추가

Code Block
# TrustedHosts 에 RoRo 서버 등록.
# 방화벽과 관계없이 RoRo 서버와의 통신을 위해 신뢰할 수 있는 호스트로 등록을 한다.
# 기존에 설정되어 있는 Host가 있다면 Overwrite를 한다.
Set-Item wsman:\localhost\Client\TrustedHosts RoRo서버IP

# TrustedHosts 목록 보기
Get-Item wsman:\localhost\Client\TrustedHosts

---------------------------------------------------------- 
예시)
# TrustedHosts에 모든 컴퓨터를 추가방법
Set-Item wsman:\localhost\Client\TrustedHosts -value *

예시) 
# TrustedHosts에 특정 도메인/IP 컴퓨터를 추가방법
Set-Item wsman:\localhost\Client\TrustedHosts test.domain.com
Set-Item wsman:\localhost\Client\TrustedHosts *.domain.com
Set-Item wsman:\localhost\Client\TrustedHosts 192.168.5.111

*** 이미 등록한 호스트가 있다면 기존 정의된 호스트에 Add 해서 등록을 한다. ***
예시) 
PS> Get-Item wsman:\localhost\Client\TrustedHosts

   WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Client

Type            Name                           SourceOfValue   Value
----            ----                           -------------   -----
System.String   TrustedHosts                                   test.domain.com,*.osci.kr

PS> Set-Item wsman:\localhost\Client\TrustedHosts 'test.domain.com,*.osci.kr,RoRo서버IP'

 

  • Session 변경 - 접속 유저 및 Shell 유저수 Limit 변경.

Code Block
winrm set winrm/config/winrs '@{MaxConcurrentUsers="20"}'
winrm set winrm/config/winrs '@{MaxShellsPerUser="20"}'

WinRM의 설정 환경 보기

Code Block
winrm get winrm/config

WinRM 서비스 Restart (필요 시)

Code Block
restart-service winrm

 

...