博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
windows 7架设OpenSSH服务器实践
阅读量:6903 次
发布时间:2019-06-27

本文共 2358 字,大约阅读时间需要 7 分钟。

参考链接

http://www.worldgoneweb.com/2011/installing-openssh-on-windows-7/

最近有个想法就是在自己的电脑开个ssh服务,然后在远程如果需要在自己电脑上工作的时候就只需要ssh连接到自己的电脑然后用mstsc remote desktop连接到自己的电脑IP上就可以了。

1.下载OpenSSH:http://sourceforge.net/projects/sshwindows/files/OpenSSH%20for%20Windows%20-%20Release/3.8p1-1%2020040709%20Build/setupssh381-20040709.zip/download

2.安装,反正我是全都默认一路走下来,期间跳出个窗口说要编辑passwd文件的警告,OK继续搞下去。

3.切换到SSH安装目录下的bin

4.

# create the default groupsmkgroup -l >> ..\etc\group#create the default usersmkpasswd -l >> ..\etc\passwd# Note: for neither of the above commands did I bother with the domain version documented in the quickstart# Now, if you look in ..\etc\passwd, you will see entries (one per line) for all your Windows users.# Start the server in debug modecd ..\usr\sbinsshd -d -d -d

5.出现如下提示

debug1: sshd version OpenSSH_3.8.1p1@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Permissions 0644 for '/etc/ssh_host_rsa_key' are too open.It is recommended that your private key files are NOT accessible by others.This private key will be ignored.bad permissions: ignore key: /etc/ssh_host_rsa_keyCould not load host key: /etc/ssh_host_rsa_key@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Permissions 0644 for '/etc/ssh_host_dsa_key' are too open.It is recommended that your private key files are NOT accessible by others.This private key will be ignored.bad permissions: ignore key: /etc/ssh_host_dsa_keyCould not load host key: /etc/ssh_host_dsa_keyDisabling protocol version 2. Could not load host keysshd: no hostkeys available -- exiting.

6.可以看出是配置文件的权限没有配置好,于是chown chmod之

cd ..\..\etc..\bin\chown 
*..\bin\chmod 600 *

7.发现貌似cygwin的dll文件出了问题,参考贴里面提供了更新的dll文件的链接cygintl-2和cygwin1.dll,地址是http://samanthahalfon.net/resources/cygwin_includes.zip,将其中的两个dll解压覆盖bin目录下的老文件,如果提示权限不足,可能是因为cygrunsrv进程还是活着的,使用了这个dll文件,杀掉cygrunsrc进程完成替换

8.重启opensshd服务

net start opensshd

9.系统提示服务启动成功,我们可以用ssh命令或者putty来试验一下

ssh 
@
# You will be prompted to accept the authenticity of host, type yes # You will be prompted for a password # Enter your windows password

10.试验成功,连接到自己的机器了

 

 

转载地址:http://uvldl.baihongyu.com/

你可能感兴趣的文章
FOSRestBundle功能包:自动路由生成-多REST风格控制器
查看>>
企业沟通是一种修行
查看>>
搞定滴滴出行双因素认证解决方案
查看>>
2017年淘客全新玩法——代理模式
查看>>
SQL Server大负载的生产环境下的性能优化:初识元数据优化
查看>>
Android帧缓冲区(Frame Buffer)硬件抽象层(HAL)模块Gralloc的实现原理分析(8)...
查看>>
衡量运维人员价值的3个基本指标
查看>>
ASP.NET vNext MVC 6 电商网站开发实战
查看>>
ORACLE 11G RAC ASM磁盘的三种冗余模式
查看>>
电商当家时代,实体店铺拼什么?
查看>>
Lync Server 2010标准版系列PART2:环境准备
查看>>
Struts 2内建的类型转换器
查看>>
Windows 8部署系列PART2:部署先决条件准备
查看>>
《统一沟通-微软-实战》-6-部署-1-前端服务器-1-准备 Active Directory 域服务
查看>>
成长之路---写好一个程序
查看>>
【COCOS2DX-LUA 脚本开发之九】cocos2dx-LuaProxy扩展extensions包
查看>>
演示:IPv6全球单播地址的配置
查看>>
微信公众号还适合投资和创业吗?
查看>>
太狗血了!分享一次网站百度收录排名异常的检查记录
查看>>
Exchange server 2016 无人值守安装
查看>>