远程windows服务器配置

在远程电脑上打开 PowerShell(右键开始菜单 → Windows Terminal):

nvidia-smi
如果输出显卡信息表格 → 驱动已装,记下 CUDA Version (如 12.4),跳到第三步

1.2 安装 NVIDIA 驱动

- 浏览器打开 https://www.nvidia.com/Download/index.aspx
- 选择你的显卡型号:
- GeForce 系列 → GeForce RTX 4090- 数- - 据中心 → A100/H100 等
- 下载驱动安装包(约 400MB)
- 双击安装 → 选择"精简安装" → 一路下一步
- 安装完成后重启电脑
- 再次打开 PowerShell 验证:

## 第二步:开启远程访问(SSH + RDP)
### 2.1 开启 OpenSSH Server
在远程电脑上, 以管理员身份 打开 PowerShell:

# 安装 OpenSSH Server
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

# 启动 SSH 服务
Start-Service sshd

# 设为开机自启
Set-Service -Name sshd -StartupType Automatic

# 防火墙放行 22 端口
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22

2.3 查看远程电脑 IP

ipconfig

找到 IPv4 地址 ,如 192.168.1.100 ,记下来。

### 2.4 从本地电脑验证连接
在 本地电脑 的 PowerShell 中:

# 测试 SSH
ssh 远程用户名@192.168.1.100

# 测试远程桌面:Win+R → mstsc → 输入 192.168.1.100

第三步:安装 Anaconda

配置国内镜像(加速下载)

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/nvidia
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --set show_channel_urls yes
conda config --set solver libmamba

### 3.4 配置 SSH 登录后自动激活 conda
SSH 登录的 shell 环境不会自动加载 conda。需要配置 PowerShell 配置文件:

 

posted @ 2026-07-09 09:27  机器智能小白凡  阅读(6)  评论(0)    收藏  举报