OpenSSH for Windows: Quick Start Guide

Windows下OpenSSH配置日志与排错全攻略:从‘Bad permissions’到成功登录 本文详细解析了Windows下OpenSSH密钥登录中常见的'Bad permissions'错误及其解决方案。通过深入分析NTFS权限体系和SSH日志机制,提供了从权限修复到日志配置的全套排错方法,帮助运维人员高效解决Windows SSH账户访问问题。 阅读详情
OpenSSH for Windows: Quick Start Guide
Michael Johnson
youngmug@users.sourceforge.net
 
Updated 9 July 2004
 
For detailed instructions, please see readme.txt. If you have questions, please check the readme and the online FAQ before contacting me.
 
In the descriptions of what to type, I use standard command notation. Items enclosed in [] are optional. Text you need to replace with entries is enclosed in <>.
 
This document is based in large part on the Quick Start Guide for Network Simplicity OpenSSH on Windows by Mark Bradshaw.
 
 
PLEASE READ THROUGH THE FULL README BEFORE YOU ASK FOR HELP. MANY THINGS ARE EXPLAINED IN MORE DETAIL THERE.
 
 
 
Install
-------
 
Run the setup program and accept the defaults (all categories).
This will install the OpenSSH server and client in an appropiate place.
 
 
 
Configuration
-------------
1. Open a command prompt and change to the installation directory (Program Files/OpenSSH is the default).
 
2. CD into the bin directory.
 
3. Use mkgroup to create a group permissions file. For local groups, use the "-l" switch. For domain groups, use the "-d" switch.
    For both domain and local, it is best to run the command twice (remember to use >>, not >). If you use both, make sure to edit the file to remove any duplicate entires.
 
      mkgroup -l >> ../etc/group      (local groups)
      mkgroup -d >> ../etc/group      (domain groups)
 
4. Use mkpasswd to add authorized users into the passwd file. For local users, use the "-l" switch. For domain users, use the "-d" switch.
    For both domain and local, it is best to run the command twice (remember to use >>, not >). If you use both, make sure to edit the file to remove any duplicate entires.
 
      mkpasswd -l [-u <username>] >> ../etc/passwd      (local users)
      mkpasswd -d [-u <username>] >> ../etc/passwd      (domain users)
 
    NOTE: To add users from a domain that is not the primary domain of the machine, add the domain name after the user name.
    NOTE: Ommitting the username switch adds ALL users from the machine or domain, including service accounts and the Guest account.
 
5. Start the OpenSSH server.
 
      net start opensshd
 
6. Test the server. Using a seperate machine as the client is best. If you connect but the connection immediately gets dropped, reboot the machine with the server and try connecting again.
 
 
 
Usage and Important Notes
-------------------------
Remember that the CYGWIN OpenSSH utilities are not graphical and are command-line based. Look at PuTTY, SSH Secure Shell, etc for graphical configuration. For more advanced ways to use the programs, look at the manual pages in the documentation directory.
 
SSH (client program):
    ssh <user@servername>
 
SCP (file copy):
    scp <localfilename> <user@servername>:<destinationdirectory>
      or
    scp <user@servername>:<remotefilename> <localfilename>
      or
    scp <user@servername>:<remotefilename> <user@otherservername>:<destinationdirectory>
 
SFTP (ftp):
    sftp <user@servername>
 
 
NOTE: While regular SSH provides a familiar Windows commandline, SCP and SFTP as well as the passwd file use Unix-style paths. This is due partly to the Unix history of SSH, and to the Cygwin source of the tools.
 
Paths in SCP and SFTP as well as the home directory listing in passwd use Unix notation. To access directories outside of the OpenSSH directory structure, use the Cygdrive notation described in readme.txt. Further explanation is in readme.txt.
 
 
The /home Directory
-------------------
In the passwd file, you will notice that the user's home directory is set as /home/username, with username being the name of the account. In the default install, the /home directory is set to the default profile directory for all users. This is usually C:/Documents and Settings on Windows 2000 and XP, and C:/WINNT/Profiles on Windows NT 4.0. The location of /home can be edited to fit your special requirements by editing a registry key.
 
To change the Windows directory /home corresponds to, you will need to edit a registry entry under HKEY_LOCAL_MACHINE/SOFTWARE/Cygnus Solutions/Cygwin/mounts v2//home. The value of the key named "native" is the directory that /home is. If you want all your users to enter in a directory on your machine called F:/Users, change "native" to read F:/Users. By default, each user will then be placed in the directory F:/Users/username, where username is the name of the user account. To place the user directly under f:/Users, change the home directory in passwd to /home.
 
Troubleshooting
---------------
Troubleshooting tips can be found in the full readme.
 
关于 /home 目录:
              在 Windows 2000 and XP 中,/home默认是在 C:/Documents and Settings
              在 Windows NT 4.0 中,/home默认是在 C:/WINNT/Profiles
要改默认的/home目录要在regedit中进行修改:,
Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE/SOFTWARE/Cygnus Solutions/Cygwin/mounts v2//home]
"native"="C://Program Files//OpenSSH//home"
"flags"=dword:0000000a
 
把 "native" 改成你自己的 /home 还有就是用户名是默认的登陆目录,比如用户名: linuxborder 那你进入的目录是 /home/linuxborder 你可以通过命令切换到根目录中,也就是 /home
 
 
 
OpenSSH for Windows搭建使用完全指南 本文还有配套的精品资源,点击获取 简介:OpenSSH for Windows是一份指南,介绍如何在Windows系统上安装和配置OpenSSH,实现安全的远程登录和文件传输功能。指南涵盖了从获取安装包、安装过程、服务启动管理、基本使用,到密钥对认证、安全优化等完整步骤。本指南旨在教授Windows用户如何利用OpenSSH提供的网络服务,以增强工作效率和数据传输安全性。 ... 阅读详情

相关推荐

Rust Reqwest+Rustls 自签名证书校验

所以这里必须保证reqwest引用的rustls库和本地工程一致。以上就是实现不校验签名的逻辑,后续自己可以在对应回调进行逻辑判断。

bawomingtian123的专栏 1381

Windows OpenSSH Server 问题记录

本机使用ssh连接本机时要密码,然而本机是无密码的,亚麻呆住。然后对用户设置密码后,ssh时输入新设置的密码还是不行。 设置账户锁屏密码。进入 找到 文件进行更改。对: 和 这2行用#进行注释:重启 sshd 图2ssh localhost #用户名随意替换输入密码后成功:

qq_51423450的博客 1051

激光光束质量评估与光斑尺寸计算:从理论到MATLAB实践

本文详细解析激光光束质量评估与光斑尺寸计算的理论基础及MATLAB实践方法,重点介绍M²因子的测量与应用。通过高斯光束模型、CCD成像法和MATLAB算法实现,帮助读者掌握从理论到实践的完整流程,提升激光系统调试与评估能力。

weixin_29083373的博客 465

Win10自带OpenSSH的使用

0、前言 昨天写了一篇文章,记录了使用Vs Code的Remote-SSH的插件连接远程Linux服务器的方法。后来觉得还是很麻烦,需要先装Vs Code其次又要装Remote-SSH插件。今天网上查了查,其中有一篇文章提到,微软官方在2018年4月份更新的Win10版本中加入了正式版的OpenSSH,并默认安装在Win10系统中。所以本篇文章就是为了记录怎么在Win10默认环境下,使用OpenSSH远程连接Linux服务器。 系统环境: 操作系统:Windows 10 21H1 服务器:Centos

啥也不会的程序员 8960

手把手教你用MOS管设计双电源自动切换电路(附零压降方案)

本文详细介绍了使用MOS管设计双电源自动切换电路的完整方案,包括基础电路拓扑、零压降优化设计及实战调试技巧。针对外接电源与电池供电的无缝切换需求,提供低损耗MOS管选型建议和性能实测数据,帮助工程师解决传统二极管方案的压降与漏电问题。

h0i1j2k3l的博客 1485

【PyGIS】ERA5降雨蒸散发数据预处理

ERA5-LAND降雨蒸散发数据预处理

```On Earth, Be Water, By Coding``` 3150

windows openssh 远程免密登录linux

1. windows 安装openssh(略) 2. windows 上生成密钥 ssh-keygen 一路默认配置下来即可。 3. 将.ssh目录中的id_rsa.pub 公钥文件传输到目标linux系统。比如要使用目标linux 中的test 用户免密登录,则将公钥文件传输到/home/test/.ssh目录中,然后执行 cat id_rsa.pub >> authorized_keys 4. 在windows 系统上尝试登录linux ssh test@X.X...

thinklog2018的博客 4031

前言:关于作者吴秋生博士与此书简介

博士现为田纳西大学,诺克斯维尔分校,地理系的副教授。他的研究兴趣包括地理信息科学(GIS)、遥感和环境建模。更具体地说,对应用地理空间大数据、机器学习和云计算(例如,谷歌地球引擎、微软行星计算机)来研究环境变化,特别是地表水和湿地淹没动态。吴博士是开放科学和可重复研究的倡导者。他开发了几个用于高级地理空间分析的开源软件包(例如,吴博士还在YouTube上发布了数百个有关GIS和地图绘制的视频。更多有关他的开源项目信息,请访问GitHub(查看他的YouTube频道。.....................

韩天放 6132

Ubuntu24.04安装zabbix6(PostgreSQL)及zabbix6图形乱码解决

想在Ubuntu上部署zabbix6,我的Ubuntu版本为23,但zabbix官方仓库,支持的Ubuntu版本只有22,24到这一步,提示翻译过来大概就是:23的依赖版本太高,真想用得回退那就别了,我用24的包,删掉22包之后,这回提示缺依赖,但升级的话目前没有这个依赖...可快算了,我老实用Ubuntu24.04。下好镜像,装好后,先把open-vm-tools,openssh-server,net-tools这三样装好。配置清华源,

Muggllee的博客 2589

【Agent】AI Agent架构趋势及演进

本文系统介绍了AI Agent架构的发展趋势和技术框架,涵盖单Agent与多Agent系统设计、提示词工程与上下文管理、SpringAI开发框架等关键技术。重点阐述了AI原生应用参考架构,包括Nacos配置管理、Higress AI网关、RocketMQ会话状态管理等核心组件解决方案。同时深入探讨了AI应用可观测性体系,包含OpenTelemetry全链路追踪、关键指标监控以及基于LoongSuite开源工具的数据采集评估方法,为构建高效可靠的AI应用提供了全景式技术参考。

一个内容严谨、方向前沿、极具实践价值的AI大模型技术分享站 1113

华为OD机试真题 新系统 - 勇攀数字高峰 (Java/Py/C/C++/Js/Go)

本文整理华为 OD 机试新系统机考真题库,涵盖高频考点精析与完整题目内容,提供 C 语言、Java、C++、Python、Go、JavaScript 多语言源码实现,搭配详细解题思路讲解,并支持在线 OJ 刷题练习,助力高效备考华为 OD 机试新系统。

算法大师! 2152

windows配置openssh

写在前面的话: 使用win自带的远程连接功能可以很方便的进行win服务器的远程管理,但如果你的系统非win10专业版,或者仅仅想进行文件复制等加密传输功能,或者使用windowns当做服务器的跳板,使用openssh可以完成以上一切操作。 以下操作请在windowns服务器端进行: 安装openssh 打开“设置”,选择“应用”>“应用和功能”,然后选择“可选功能” 。 扫描列表,查看是否已安装 OpenSSH。 如果未安装,请在页面顶部选择“添加功能”,然后: 查找 “OpenSSH 客户端”,再

ace1231的博客 7269

YOLOv8改进 | 主干篇 | 利用MobileNetV2替换Backbone(轻量化网络结构)

本文给大家带来的改进机制是,其是专为移动和嵌入式视觉应用设计的轻量化网络结构。这些模型基于简化的架构,并利用深度可分离卷积构建轻量级深度神经网络,其引入了两个简单的全局超参数,用于在延迟和准确性之间进行有效的权衡。实验表明,MobileNets在资源和准确性的权衡方面表现出色,并在多种应用(如对象检测、细粒度分类、面部属性识别和大规模地理定位)中展现了其有效性,这个模型非常适合轻量化的读者来使用。适用检测目标:轻量化网络结构适合轻量化的读者⭐⭐⭐⭐。

Snu77的博客 5694

OpenSSH服务配置日志

架设OpenSSH服务器完全日志 简介: 之前在架设telnet服务时提到,telnet服务使用明文来传输数据,存在着严重的安全的隐患,在实际应用中并不推荐使用,而是应该使用经过加密后的才传输数据的安全的终端。OpenSSH就是在不安全的网络环境中采用加密机制来保证传输数据安全的佼佼者之一。 OpenSSH的前身是SSH(Secure ...

weixin_34361881的博客 2886

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

windows下openssh无密码ssh登陆linux

1.安装openssh软件 2.Windows端配置: cmd下执行: ssh-keygen -t dsa 提示Enter passphrase时留空,直接回车。 在/用户登陆目录/.ssh目录下生成了两个文件id_dsa, id_dsa.pub,将其中的 id_dsa.pub通过scp命令复制到服务器端的/tmp目录下 view

gaoxuefeng的专栏 5987

InTheHand.Net.Personal+BlueTooth4,蓝牙开发

项目中有蓝牙开发的必备dll,现在网上相关的文档博客不少,有的说的多有的说少,但是却很少有这两个dll,分享一下。

99.5. OpenSSH 日志 /var/log/secure

查询出恶意穷举密码的IP地址 # cat /var/log/rinetd.log | awk '{print $2}' | awk -F'.' '{print $1"."$2"."$3"."$4}' | sort | uniq -c | sort -r -n | head -n 50 查看曾经登陆成功的IP地址 grep Accepted /var...

weixin_33801856的博客 364

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

Linux下vim的配置

Linux下vim的配置,原文地址:http://blog.csdn.net/luckytanggu/article/details/52045357 一、安装vim插件管理工具Vundle 1、创建文件夹 mkdir -p ~/.vim/bundle 2、克隆Vundle到bundle目录下 Git clone git@github.com:Vundle

u010002387的专栏 2358

在Windows下使用OpenSSH来建立SFTP Server

window下面配置sftp, 请使用下面的link去查看 https://www.cnblogs.com/BinZeng/p/4045162.html SFTP serverhttp://www.freesshd.com/

cscda12的博客 4320

OpenSSH for windows 与ssh windows

OpenSSH for windows 与ssh windows 平时常用putty运行sshclient来连虚拟机上的linux,这实在是太方便了,而现在需要远程登陆到的windows里,虽然telnet也行,但太旧也不安全,于从网上找了遍用ssh连windows方法,这需要在windows上安装openssh server,但令人兴奋的是,它竟然自...

weixin_34199405的博客 544

OpenSSH for Windows 配置

OpenSSH for Windows 配置   1.      下载openssh并安装。安装很简单,就像其它windows下的软件一样,双击即可。 2.  配置。      第一、打开一个ms-dos终端,进入openssh/bin目录。     第二、将计算机上的组导入group文件中。这里分两种情况,第一种是本地,第二种是在域中。分别运行-l和-d参数。如果想将两种组都导入,可以先...

知识的宝藏 3110

Win 7/Win 8/Win 10/Windows Server 下安装和使用OpenSSH客户端

文章目录1.Win 7/Win 8的OpenSSH的安装2..Windows Server 2019 和 Windows 10 1809之后版本的Windows的OpenSSH的安装 1.Win 7/Win 8的OpenSSH的安装 Win 7或者Win 8上没有powershell,微软官方推荐的OpenSSH客户端是Git for Windows。 下载地址:Git - Downloading...

个人博客 1万+

window10 安装 openSSH服务

下载 下载openSSH windows版 链接:https://pan.baidu.com/s/1Ge1yFnM3PxOMdkBOx5nyhg 提取码:open 解压到指定路径 解压到C:\Program Files\OpenSSH 不要放在别的路径下,官方这样要求的 执行命令 cmd到openSSH路径下 依次执行 1)安装sshd服务 powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1 2)开放22号端口(如果你在win

RanGe的博客 8630

win10系统中openssh服务的安装、打开和关闭、连接和断开

win10,openssh服务的安装、打开和关闭、连接和断开

jjruanlili的博客 1万+
上一篇: Del.icio.us:一个轻量级的link blog
下一篇: 有关b/s结构下applet在webServer中部署问题。。
border1985
博客等级 码龄22年 5粉丝 42原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值