윈도우 tmux 설치 시 필요하면 openssh server도 설치하도록 추가

This commit is contained in:
Jerry Chae committed 2026-05-27 10:50:39 +09:00
1 parent bc1f52c030
commit f4adbf0915
2 files changed
+32

No files matched your search

+2
View File
@@ -109,6 +109,7 @@
```powershell ```powershell
powershell -ExecutionPolicy Bypass -c "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; $t=\"$env:TEMP\install-tmux.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-tmux.ps1' -OutFile $t; & $t" powershell -ExecutionPolicy Bypass -c "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; $t=\"$env:TEMP\install-tmux.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-tmux.ps1' -OutFile $t; & $t"
``` ```
> 💡 **Windows OpenSSH Server 참고:** 스크립트 가동 시 OpenSSH Server(sshd)가 미설치된 상태라면 자동으로 감지 및 백그라운드 설치 후 기동합니다. (관리자 권한이 필요할 수 있습니다.)
* **superfile:** * **superfile:**
```powershell ```powershell
@@ -203,6 +204,7 @@ tmux ls # 가동 중인 세션 목록 보기
| `Prefix &` | 현재 활성화된 창 완전히 닫기 | | `Prefix &` | 현재 활성화된 창 완전히 닫기 |
> 💡 `install-tmux` 스크립트는 최적화된 커스텀 `.tmux.conf` 파일을 사용자 홈 디렉토리에 배포합니다. (기존 설정 파일이 있다면 `.tmux.conf.bak.*`로 자동 백업됩니다.) > 💡 `install-tmux` 스크립트는 최적화된 커스텀 `.tmux.conf` 파일을 사용자 홈 디렉토리에 배포합니다. (기존 설정 파일이 있다면 `.tmux.conf.bak.*`로 자동 백업됩니다.)
> 💡 **Windows (PowerShell) 참고:** 윈도우 환경에서 실행할 경우, OpenSSH Server 서비스(`sshd`)가 작동하지 않거나 없을 시 Windows 선택적 기능(Optional Capability)을 통하여 무인 설치 및 구동까지 완전 자동 지원합니다.
#### 1.2. superfile #### 1.2. superfile
수려하고 미려한 디자인을 선사하는 고기능 터미널 파일 관리자입니다. 수려하고 미려한 디자인을 선사하는 고기능 터미널 파일 관리자입니다.
+30
View File
@@ -47,6 +47,36 @@ function ErrExit { Write-Host "[ERROR] $args" -ForegroundColor Red; exit 1 }
# ──────────────────────────────────────────── # ────────────────────────────────────────────
$ConfFile = Join-Path $env:USERPROFILE '.tmux.conf' $ConfFile = Join-Path $env:USERPROFILE '.tmux.conf'
# ────────────────────────────────────────────
# Step 0: Ensure OpenSSH Server
# ────────────────────────────────────────────
Info "OpenSSH Server 설치 여부 확인 중..."
$sshService = Get-Service -Name "sshd" -ErrorAction SilentlyContinue
if (-not $sshService) {
Info "OpenSSH Server가 설치되어 있지 않습니다. 설치를 시도합니다..."
# OpenSSH Server 기능 추가 (관리자 권한 필요)
try {
$capability = Get-WindowsCapability -Online -Name "OpenSSH.Server~~~~0.0.1.0"
if ($capability.State -ne "Installed") {
Info "Windows 선택적 기능에서 OpenSSH Server를 설치하는 중..."
Add-WindowsCapability -Online -Name "OpenSSH.Server~~~~0.0.1.0" > $null
Success "OpenSSH Server 기능이 성공적으로 추가되었습니다."
}
# sshd 서비스 시작 및 자동 실행 설정
Set-Service -Name "sshd" -StartupType Automatic
Start-Service -Name "sshd"
Success "OpenSSH Server(sshd) 서비스가 시작되었으며 자동 실행으로 설정되었습니다."
} catch {
Warn "OpenSSH Server 자동 설치에 실패했습니다: $_"
Warn "이 기능은 '관리자 권한'이 필요할 수 있습니다."
}
} else {
Success "OpenSSH Server가 이미 설치되어 있습니다."
}
# ──────────────────────────────────────────── # ────────────────────────────────────────────
# Step 1: Install tmux # Step 1: Install tmux
# ──────────────────────────────────────────── # ────────────────────────────────────────────