Doraemon

小叮当    2012 - 2023
Doraemon

Choose mode

  • dark
  • auto
  • light
首页
Category
  • 前端开发
  • 后端
  • 数据库
  • 运维
Tag
TimeLine
关于
  • 关于我
Contact
  • GitHub
author-avatar

小叮当

39

Article

25

Tag

首页
Category
  • 前端开发
  • 后端
  • 数据库
  • 运维
Tag
TimeLine
关于
  • 关于我
Contact
  • GitHub

在 Windows server 2008 中安装 openSSH

小叮当    2012 - 2023

在 Windows server 2008 中安装 openSSH


小叮当 2020-08-16 OpenSSHWindows server运维

Windows 10 直接自带 openSSH,开启服务,并且让服务自动启动即可

# 1、下载OpenSSH-Win64.zip

https://github.com/PowerShell/Win32-OpenSSH/releases

解压放到 C:\Program Files\OpenSSH-Win64

进入到 C:\Program Files\OpenSSH-Win64

使用文档:https://github.com/powershell/win32-openssh/wiki

# 2、使用命令安装 openSSH 服务

按住 shift 和鼠标右键 运行 cmd

powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1
1

# 3、打开防火墙过滤

netsh advfirewall firewall add rule name=sshd dir=in action=allow protocol=TCP localport=22
1

windows 2012(含)以上的服务器使用如下命令打开防火墙过滤

New-NetFirewallRule -Name sshd -DisplayName ‘OpenSSH Server (sshd)’ -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
1

# 4、设置服务自动启动并启动服务:

配置 sshd 自动启动

sc config sshd start= auto
1

启动 sshd

net start sshd
1

# 5、安装 FileZilla 和使用

FileZilla 免费开源的 FTP 解决方案

https://www.filezilla.cn/download/client

使用 sftp 方式登录后,进入网站目录即可

/C:/inetpub/wwwroot/blog
1
  • 1、下载OpenSSH-Win64.zip
  • 2、使用命令安装 openSSH 服务
  • 3、打开防火墙过滤
  • 4、设置服务自动启动并启动服务:
  • 5、安装 FileZilla 和使用