운영체제/Windows
[SSH] Windows Server 2019에 SSH 설치
백오타빅
2022. 7. 23. 14:37
반응형
Window에 SSH 설치
구성 방법
1. 다운로드 받을 수 있는 SSH 버전 확인
> Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*' |
2. SSH Server와 Client 설치
> Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 > Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 |
3. 서비스 기동 및 자동 기동 설정
> Start-Service sshd |
> Set-Service -Name sshd -StartupType 'Automatic' |
4. SSH 통신 방화벽 활성화
> New-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 |
오류 발생
New-NetFirewallRule : Cannot create a file when that file already exists.
이미 같은 이름으로 방화벽이 생성된 상태이다. 아래 이미지처럼 나올 경우 삭제하고 진행.
> Remove-NetFirewallRule -DisplayName "OpenSSH Server (sshd)" |
Ref.
https://docs.microsoft.com/ko-kr/windows-server/administration/openssh/openssh_install_firstuse
반응형