蝙蝠岛资源网 Design By www.hbtsch.com

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

1.下载OpenSSH:https://www.jb51.net/softs/420320.html
2.安装,反正我是全都默认一路走下来,期间跳出个窗口说要编辑passwd文件的警告,OK继续搞下去。
3.切换到SSH安装目录下的bin
4.

复制代码 代码如下:
# create the default groups
mkgroup -l ../etc/group
#create the default users
mkpasswd -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 mode
cd ../usr/sbin
sshd -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_key
Could 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_key
Could not load host key: /etc/ssh_host_dsa_key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.

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

复制代码 代码如下:
cd ../../etc
../bin/chown <username> *
../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 <username>@<ip_windows_machine>
# You will be prompted to accept the authenticity of host, type yes
# You will be prompted for a password

# Enter your windows password

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

备注:

sshd -d -d -d执行不了,但是不影响启停openssh服务的进程。
sshd.exe – 系统错误
无法启动此程序,因为计算机中丢失 cygcrypto-0.9.7.dll。尝试重新安装该程序以解决此问题。

windows 7架设OpenSSH服务器实践

标签:
OpenSSH

蝙蝠岛资源网 Design By www.hbtsch.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
蝙蝠岛资源网 Design By www.hbtsch.com

评论“windows 7架设OpenSSH服务器实践”

暂无windows 7架设OpenSSH服务器实践的评论...

P70系列延期,华为新旗舰将在下月发布

3月20日消息,近期博主@数码闲聊站 透露,原定三月份发布的华为新旗舰P70系列延期发布,预计4月份上市。

而博主@定焦数码 爆料,华为的P70系列在定位上已经超过了Mate60,成为了重要的旗舰系列之一。它肩负着重返影像领域顶尖的使命。那么这次P70会带来哪些令人惊艳的创新呢?

根据目前爆料的消息来看,华为P70系列将推出三个版本,其中P70和P70 Pro采用了三角形的摄像头模组设计,而P70 Art则采用了与上一代P60 Art相似的不规则形状设计。这样的外观是否好看见仁见智,但辨识度绝对拉满。