zoukankan      html  css  js  c++  java
  • Installing SFTP/SSH Server on Windows using OpenSSH

    Installing SFTP/SSH Server

    1. On Windows 10 version 1803 and newer


    In Settings app, go to Apps > Apps & features > Manage optional features.
    Locate “OpenSSH server” feature, expand it, and select Install.
    Binaries are installed to %WINDIR%System32OpenSSH. Configuration file (sshd_config) and host keys are installed to %ProgramData%ssh (only after the server is started for the first time).

    You may still want to use the following manual installation, if you want to install a newer version of OpenSSH than the one built into Windows 10.

    2. On earlier versions of Windows

    Download the latest OpenSSH for Windows binaries (package OpenSSH-Win64.zip or OpenSSH-Win32.zip)
    As the Administrator, extract the package to C:Program FilesOpenSSH
    As the Administrator, install sshd and ssh-agent services:
    powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1


    Configuring SSH server

      Allow incoming connections to SSH server in Windows Firewall:
      1. Either run the following PowerShell command (Windows 8 and 2012 or newer only), as the Administrator: 

    New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH SSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22

      2. or go to Control Panel > System and Security > Windows Firewall1 > Advanced Settings > Inbound Rules and add a new rule for port 22.

    • Start the service and/or configure automatic start:
    1. Go to Control Panel > System and Security > Administrative Tools and open Services. Locate OpenSSH SSH Server service.
    2. If you want the server to start automatically when your machine is started: Go to Action > Properties. In the Properties dialog, change Startup type to Automatic and confirm.
    3. Start the OpenSSH SSH Server service by clicking the Start the service.
  • 相关阅读:
    List遍历时删除与迭代器(Iterator)解惑
    从一次“并发修改字段业务”引出多版本并发控制与InnoDB锁
    RocketMQ存储机制与确认重传机制
    Java中的锁
    jmeter在non-GUI模式下用法
    Java SPI机制简述
    深拷贝、浅拷贝与Cloneable接口
    Java中的小数运算与精度损失
    java中的枚举类
    SpringBoot是如何实现自动配置的
  • 原文地址:https://www.cnblogs.com/xingfuxiaokong/p/11466357.html
Copyright © 2011-2022 走看看