---
title: "Cài đặt OpenSSH Server trên VPS Windows quản trị nhanh cùng RDP"
description: "Hướng dẫn cài đặt và kích hoạt OpenSSH Server chính chủ trên VPS Windows Server 2022/2025 để điều khiển PowerShell từ xa, chép file SCP/SFTP và tạo SSH Tunnel."
canonical: "https://thuecloud.vn/huong-dan-dung-ssh-va-powershell-remoting-quan-tri-vps-windows"
markdown_url: "https://thuecloud.vn/huong-dan-dung-ssh-va-powershell-remoting-quan-tri-vps-windows.md"
locale: "vi"
kind: "article"
published_at: "2026-11-22T16:18:04.670Z"
updated_at: "2026-11-22T16:18:01.848Z"
site: "ThueCloud.Vn"
estimated_tokens: 1865
---
# Cài đặt OpenSSH Server trên VPS Windows quản trị nhanh cùng RDP

> Hướng dẫn cài đặt và kích hoạt OpenSSH Server chính chủ trên VPS Windows Server 2022/2025 để điều khiển PowerShell từ xa, chép file SCP/SFTP và tạo SSH Tunnel.

- Canonical HTML: https://thuecloud.vn/huong-dan-dung-ssh-va-powershell-remoting-quan-tri-vps-windows
- Markdown URL: https://thuecloud.vn/huong-dan-dung-ssh-va-powershell-remoting-quan-tri-vps-windows.md
- Organization: ThueCloud.Vn
- Support Email: support@thuecloud.vn
- Hotline: 03333 499 48
- Published: 2026-11-22
- Updated: 2026-11-22

## Mục lục

- Tại sao nên cài OpenSSH Server trên VPS Windows?
- Bảng lệnh cài đặt và kích hoạt OpenSSH Server (PowerShell Admin)
- Kiểm tra trạng thái và bảo mật OpenSSH trên Windows
- Khởi động lại dịch vụ sshd sau khi sửa cấu hình
- Câu hỏi thường gặp (FAQ)
  - Cài OpenSSH Server trên Windows có làm xung đột với Remote Desktop (RDP) không?
  - File authorized_keys cho tài khoản Administrator trên Windows nằm ở đâu?
  - Có thể dùng OpenSSH để tạo SSH Tunnel cho RDP không?
- Tài nguyên & bài viết liên quan

## Tại sao nên cài OpenSSH Server trên VPS Windows?

Cài đặt **OpenSSH Server** chính chủ trên Windows Server 2022/2025 giúp bạn truy cập dòng lệnh PowerShell từ xa chỉ trong 1 giây, truyền file bảo mật bằng `scp`/`sftp` thay cho ánh xạ ổ đĩa, và tạo **SSH Tunnel** bảo vệ các cổng quản trị mà không cần mở trực tiếp ra Internet. Đây là cách quản trị cực kỳ hiệu quả song song với giao diện RDP.

## Bảng lệnh cài đặt và kích hoạt OpenSSH Server (PowerShell Admin)

```powershell
# Kiểm tra gói OpenSSH Server khả dụng
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH.Server*'

# Cài đặt OpenSSH Server
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

# Khởi động dịch vụ sshd và đặt tự chạy cùng Windows
Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'

# Đặt PowerShell làm shell mặc định thay cho CMD
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell `
  -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force
```

## Kiểm tra trạng thái và bảo mật OpenSSH trên Windows

| Hạng mục | Lệnh / Đường dẫn kiểm tra | Lưu ý bảo mật |
| --- | --- | --- |
| Rule Firewall port 22 | `Get-NetFirewallRule -Name *OpenSSH-Server*` | Nên giới hạn IP nguồn tương tự rule RDP |
| Xác thực SSH Key (Admin) | `C:\ProgramData\ssh\administrators_authorized_keys` | Áp dụng tư duy khóa [SSH key Ed25519](https://thuecloud.vn/thiet-lap-ssh-key-ed25519-bao-mat-vps-linux) |
| Truyền file nhanh | `scp file.zip Administrator@<IP_VPS>:C:/Temp/` | Nhanh và an toàn hơn chia sẻ ổ đĩa qua RDP |

## Khởi động lại dịch vụ sshd sau khi sửa cấu hình

Mỗi khi thay đổi cấu hình xác thực trong file `C:\ProgramData\ssh\sshd_config` (ví dụ tắt đăng nhập mật khẩu `PasswordAuthentication no` sau khi đã nạp xong SSH key), bạn chạy lệnh sau để áp dụng ngay:

```powershell
Restart-Service sshd
Get-Service sshd | Select-Object Name, Status, StartType
```

Để bảo vệ cổng SSH 22 cũng như cổng RDP khỏi quét tự động, hãy áp dụng nguyên tắc lọc IP theo [bảo mật VPS Windows với Windows Defender Firewall](https://thuecloud.vn/bao-mat-vps-windows-voi-windows-defender-firewall-va-ipsec). Kết hợp OpenSSH cùng giao diện đã tinh chỉnh theo [hướng dẫn tối ưu Remote Desktop VPS Windows](https://thuecloud.vn/toi-uu-remote-desktop-vps-windows-muot-ma) trên hạ tầng [VPS Việt Nam NVMe](https://thuecloud.vn/vps-viet-nam) sẽ giúp bạn làm việc cực kỳ linh hoạt. Xem thêm cấu hình tại [bảng giá dịch vụ](https://thuecloud.vn/pricing) hoặc [hướng dẫn mua VPS](https://thuecloud.vn/huong-dan-mua-va-kich-hoat-vps-tren-thuecloud).

## Câu hỏi thường gặp (FAQ)

### 1. Cài OpenSSH Server trên Windows có làm xung đột với Remote Desktop (RDP) không?
Hoàn toàn không. OpenSSH lắng nghe trên cổng `22` còn RDP chạy trên cổng `3389` (hoặc port tùy chỉnh của bạn), hoạt động độc lập với nhau.

### 2. File `authorized_keys` cho tài khoản `Administrator` trên Windows nằm ở đâu?
Khác với user thường nằm trong `%USERPROFILE%\.ssh\authorized_keys`, khóa của tài khoản thuộc nhóm `Administrators` mặc định phải đặt tại `C:\ProgramData\ssh\administrators_authorized_keys`.

### 3. Có thể dùng OpenSSH để tạo SSH Tunnel cho RDP không?
Có. Bạn có thể đóng hẳn cổng 3389 ra Internet trên Firewall, chỉ mở cổng SSH và chạy `ssh -L 13389:127.0.0.1:3389 Administrator@<IP_VPS>`, rồi dùng `mstsc` kết nối vào `127.0.0.1:13389`.

> **Khởi tạo Windows VPS KVM NVMe nhanh chóng tại ThueCloud.Vn:** Trải nghiệm [VPS Việt Nam KVM NVMe](https://thuecloud.vn/vps-viet-nam) hỗ trợ Windows Server 2019/2022, băng thông ổn định tại Hà Nội (`vn-hn`), từ `45.000đ/tháng` (VAT 0%). Kết hợp dễ dàng với [Proxy Việt Nam](https://thuecloud.vn/proxy-viet-nam) và [Proxy USA](https://thuecloud.vn/proxy-usa) — xem [bảng giá ThueCloud](https://thuecloud.vn/pricing).

## Tài nguyên & bài viết liên quan
- **Trang giải pháp & công cụ ThueCloud:** [giải pháp hạ tầng Cloud](https://thuecloud.vn/giai-phap), [công cụ tính cấu hình VPS](https://thuecloud.vn/tools), [câu hỏi thường gặp (FAQ)](https://thuecloud.vn/faq).
- **Bài viết chuyên sâu:** [Cài đặt và cấu hình SSMS Quản trị DB trên Windows Server 2022 VPS](https://thuecloud.vn/cai-dat-va-cau-hinh-ssms-quan-tri-db-tren-windows-server-2022-vps)
- **Bài viết chuyên sâu:** [Cài đặt và cấu hình OpenSSH Server Windows trên Windows Server 2022 VPS](https://thuecloud.vn/cai-dat-va-cau-hinh-openssh-server-windows-tren-windows-server-2022-vps)

## References / Sources

- https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/welcome-to-rds
- https://learn.microsoft.com/en-us/powershell/
- https://ubuntu.com/server/docs

---

## Navigation & Machine-Readable Endpoints

- [Site Summary (llms.txt)](https://thuecloud.vn/llms.txt)
- [Full Technical Reference (llms-full.txt)](https://thuecloud.vn/llms-full.txt)
- [Pricing Catalog (Markdown)](https://thuecloud.vn/pricing.md)
- [Blog & Technical Guides (Markdown)](https://thuecloud.vn/blog.md)
- [XML Sitemap](https://thuecloud.vn/sitemap.xml)
